ARM: 7053/1: gpio/tegra: Implement gpio_chip.to_irq
authorStephen Warren <swarren@nvidia.com>
Mon, 22 Aug 2011 23:39:56 +0000 (00:39 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 24 Aug 2011 07:28:37 +0000 (08:28 +0100)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/gpio/gpio-tegra.c

index ecade29d79e8ee7bb12776e49f04bd3e3c4438df..df64536464f05a50dd332a6657f4c4793aec906b 100644 (file)
@@ -134,7 +134,10 @@ static int tegra_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
        return 0;
 }
 
-
+static int tegra_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
+{
+       return TEGRA_GPIO_TO_IRQ(offset);
+}
 
 static struct gpio_chip tegra_gpio_chip = {
        .label                  = "tegra-gpio",
@@ -142,6 +145,7 @@ static struct gpio_chip tegra_gpio_chip = {
        .get                    = tegra_gpio_get,
        .direction_output       = tegra_gpio_direction_output,
        .set                    = tegra_gpio_set,
+       .to_irq                 = tegra_gpio_to_irq,
        .base                   = 0,
        .ngpio                  = TEGRA_NR_GPIOS,
 };