gpio-pxa.h 571 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __GPIO_PXA_H
  3. #define __GPIO_PXA_H
  4. #define GPIO_bit(x) (1 << ((x) & 0x1f))
  5. #define gpio_to_bank(gpio) ((gpio) >> 5)
  6. /* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).
  7. * Those cases currently cause holes in the GPIO number space, the
  8. * actual number of the last GPIO is recorded by 'pxa_last_gpio'.
  9. */
  10. extern int pxa_last_gpio;
  11. extern int pxa_irq_to_gpio(int irq);
  12. struct pxa_gpio_platform_data {
  13. int irq_base;
  14. int (*gpio_set_wake)(unsigned int gpio, unsigned int on);
  15. };
  16. #endif /* __GPIO_PXA_H */