050-gpio-to-irq.patch 570 B

123456789101112131415161718192021
  1. --- a/arch/arm/mach-gemini/gpio.c
  2. +++ b/arch/arm/mach-gemini/gpio.c
  3. @@ -196,12 +196,18 @@ static int gemini_gpio_direction_output(
  4. return 0;
  5. }
  6. +static int gemini_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
  7. +{
  8. + return gpio + GPIO_IRQ_BASE;
  9. +}
  10. +
  11. static struct gpio_chip gemini_gpio_chip = {
  12. .label = "Gemini",
  13. .direction_input = gemini_gpio_direction_input,
  14. .get = gemini_gpio_get,
  15. .direction_output = gemini_gpio_direction_output,
  16. .set = gemini_gpio_set,
  17. + .to_irq = gemini_gpio_to_irq,
  18. .base = 0,
  19. .ngpio = GPIO_PORT_NUM * 32,
  20. };