All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 2.6.27-rc7-omap-git+ 3/3] twl4030 uses new gpio_to_irq() hooks
@ 2008-10-03  0:49 David Brownell
  0 siblings, 0 replies; only message in thread
From: David Brownell @ 2008-10-03  0:49 UTC (permalink / raw)
  To: linux-omap

From: David Brownell <dbrownell@users.sourceforge.net>

Make twl4030 GPIO support the new gpio_to_irq() hook

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
 drivers/gpio/twl4030-gpio.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/gpio/twl4030-gpio.c
+++ b/drivers/gpio/twl4030-gpio.c
@@ -630,6 +630,12 @@ static void twl_set(struct gpio_chip *ch
 	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,
@@ -639,6 +645,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,
 };
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-03  0:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-03  0:49 [patch 2.6.27-rc7-omap-git+ 3/3] twl4030 uses new gpio_to_irq() hooks David Brownell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.