blob: d90ebbe02ca4b257ff00a7a628f34aaef25ab3be [file] [log] [blame]
Haojian Zhuang157d2642011-10-17 20:37:52 +08001#ifndef __GPIO_PXA_H
2#define __GPIO_PXA_H
3
4#define GPIO_bit(x) (1 << ((x) & 0x1f))
5
6#define gpio_to_bank(gpio) ((gpio) >> 5)
7
8/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).
9 * Those cases currently cause holes in the GPIO number space, the
10 * actual number of the last GPIO is recorded by 'pxa_last_gpio'.
11 */
12extern int pxa_last_gpio;
13
14extern int pxa_irq_to_gpio(int irq);
15
Robert Jarzmikb95ace52012-04-22 13:37:24 +020016struct pxa_gpio_platform_data {
Haojian Zhuangb8f649f2013-04-09 18:12:04 +080017 int irq_base;
Robert Jarzmikb95ace52012-04-22 13:37:24 +020018 int (*gpio_set_wake)(unsigned int gpio, unsigned int on);
19};
20
Haojian Zhuang157d2642011-10-17 20:37:52 +080021#endif /* __GPIO_PXA_H */