From: David Brownell Date: Fri, 3 Oct 2008 16:04:47 +0000 (-0700) Subject: twl4030-gpio implements to_irq() X-Git-Tag: v2.6.27-omap1~84 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=48a6370c8f3e85fdc2a783e0dc706b711581aa1d;p=linux-2.6-omap-h63xx.git twl4030-gpio implements to_irq() Make twl4030 GPIO support the new gpio_to_irq() hook Signed-off-by: David Brownell Signed-off-by: Tony Lindgren --- diff --git a/drivers/gpio/twl4030-gpio.c b/drivers/gpio/twl4030-gpio.c index a38a0235337..f944b2db392 100644 --- a/drivers/gpio/twl4030-gpio.c +++ b/drivers/gpio/twl4030-gpio.c @@ -653,6 +653,12 @@ static void twl_set(struct gpio_chip *chip, unsigned offset, int value) twl4030_set_gpio_dataout(offset, value); } +static int twl_to_irq(struct gpio_chip *chip, unsigned offset) +{ + /* NOTE: assumes IRQs are set up ... */ + return twl4030_gpio_irq_base + offset; +} + static struct gpio_chip twl_gpiochip = { .label = "twl4030", .owner = THIS_MODULE, @@ -660,6 +666,7 @@ static struct gpio_chip twl_gpiochip = { .get = twl_get, .direction_output = twl_direction_out, .set = twl_set, + .to_irq = twl_to_irq, .can_sleep = 1, };