diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-04-02 09:51:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-04-05 14:18:12 -0400 |
commit | ddf438cf2a6de9aa47783a45907e1188b9437ff7 (patch) | |
tree | 84554917190cdde43ce9be6a8d73ba645ed7512f /drivers/gpio | |
parent | c9fbf7e070bbf9cc7adc1420df87706c62cb04ed (diff) |
gpiolib: Implement gpio_to_irq for WM8994 GPIO controller
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/wm8994-gpio.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpio/wm8994-gpio.c b/drivers/gpio/wm8994-gpio.c index de28b4a470ea..3ee35badcf1d 100644 --- a/drivers/gpio/wm8994-gpio.c +++ b/drivers/gpio/wm8994-gpio.c | |||
@@ -80,6 +80,18 @@ static void wm8994_gpio_set(struct gpio_chip *chip, unsigned offset, int value) | |||
80 | wm8994_set_bits(wm8994, WM8994_GPIO_1 + offset, WM8994_GPN_LVL, value); | 80 | wm8994_set_bits(wm8994, WM8994_GPIO_1 + offset, WM8994_GPN_LVL, value); |
81 | } | 81 | } |
82 | 82 | ||
83 | static int wm8994_gpio_to_irq(struct gpio_chip *chip, unsigned offset) | ||
84 | { | ||
85 | struct wm8994_gpio *wm8994_gpio = to_wm8994_gpio(chip); | ||
86 | struct wm8994 *wm8994 = wm8994_gpio->wm8994; | ||
87 | |||
88 | if (!wm8994->irq_base) | ||
89 | return -EINVAL; | ||
90 | |||
91 | return wm8994->irq_base + offset; | ||
92 | } | ||
93 | |||
94 | |||
83 | #ifdef CONFIG_DEBUG_FS | 95 | #ifdef CONFIG_DEBUG_FS |
84 | static void wm8994_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) | 96 | static void wm8994_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) |
85 | { | 97 | { |