diff options
| author | Keerthy <j-keerthy@ti.com> | 2018-06-12 23:40:37 -0400 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2018-06-18 01:55:30 -0400 |
| commit | eb3744a2dd01cb07ce9f556d56d6fe451f0c313a (patch) | |
| tree | 0c14eca065d5b66220dc97ffea58ea90e9644900 /include/linux/platform_data | |
| parent | c1d013a70f557e0d6db29398c955b2ec87db1ff8 (diff) | |
gpio: davinci: Do not assume continuous IRQ numbering
Currently the driver assumes that the interrupts are continuous
and does platform_get_irq only once and assumes the rest are continuous,
instead call platform_get_irq for all the interrupts and store them
in an array for later use.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/gpio-davinci.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/platform_data/gpio-davinci.h b/include/linux/platform_data/gpio-davinci.h index 90ae19ca828f..57a5a35e0073 100644 --- a/include/linux/platform_data/gpio-davinci.h +++ b/include/linux/platform_data/gpio-davinci.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <asm-generic/gpio.h> | 22 | #include <asm-generic/gpio.h> |
| 23 | 23 | ||
| 24 | #define MAX_REGS_BANKS 5 | 24 | #define MAX_REGS_BANKS 5 |
| 25 | #define MAX_INT_PER_BANK 32 | ||
| 25 | 26 | ||
| 26 | struct davinci_gpio_platform_data { | 27 | struct davinci_gpio_platform_data { |
| 27 | u32 ngpio; | 28 | u32 ngpio; |
| @@ -41,7 +42,7 @@ struct davinci_gpio_controller { | |||
| 41 | spinlock_t lock; | 42 | spinlock_t lock; |
| 42 | void __iomem *regs[MAX_REGS_BANKS]; | 43 | void __iomem *regs[MAX_REGS_BANKS]; |
| 43 | int gpio_unbanked; | 44 | int gpio_unbanked; |
| 44 | unsigned int base_irq; | 45 | int irqs[MAX_INT_PER_BANK]; |
| 45 | unsigned int base; | 46 | unsigned int base; |
| 46 | }; | 47 | }; |
| 47 | 48 | ||
