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>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <asm-generic/gpio.h>
|
||||
|
||||
#define MAX_REGS_BANKS 5
|
||||
#define MAX_INT_PER_BANK 32
|
||||
|
||||
struct davinci_gpio_platform_data {
|
||||
u32 ngpio;
|
||||
@@ -41,7 +42,7 @@ struct davinci_gpio_controller {
|
||||
spinlock_t lock;
|
||||
void __iomem *regs[MAX_REGS_BANKS];
|
||||
int gpio_unbanked;
|
||||
unsigned int base_irq;
|
||||
int irqs[MAX_INT_PER_BANK];
|
||||
unsigned int base;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user