blob: 2d8d6943281376a72195f5363cc1126560764e43 [file] [log] [blame]
Magnus Damm119f5e42013-03-13 20:32:13 +09001/*
2 * Renesas R-Car GPIO Support
3 *
4 * Copyright (C) 2013 Magnus Damm
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef __GPIO_RCAR_H__
17#define __GPIO_RCAR_H__
18
19struct gpio_rcar_config {
Laurent Pinchart36cb0062013-05-10 16:48:36 +020020 int gpio_base;
Magnus Damm119f5e42013-03-13 20:32:13 +090021 unsigned int irq_base;
22 unsigned int number_of_pins;
Laurent Pinchartdc3465a2013-03-10 03:27:00 +010023 const char *pctl_name;
Simon Horman7e1092b2013-05-24 18:47:24 +090024 unsigned has_both_edge_trigger:1;
Magnus Damm119f5e42013-03-13 20:32:13 +090025};
26
Laurent Pinchart11df28a2013-04-08 11:36:13 +020027#define RCAR_GP_PIN(bank, pin) (((bank) * 32) + (pin))
28
Magnus Damm119f5e42013-03-13 20:32:13 +090029#endif /* __GPIO_RCAR_H__ */