diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2014-07-25 08:54:48 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-07-28 12:23:57 +0200 |
commit | afa82fab5e136fc64eaf26db9b00c661286e1762 (patch) | |
tree | 551a6268bc2fc528e2420dfd41db45e1f83d92f0 /drivers/gpio/gpiolib.c | |
parent | gpio: lynxpoint: Convert to use gpiolib irqchip (diff) | |
download | linux-afa82fab5e136fc64eaf26db9b00c661286e1762.tar.xz linux-afa82fab5e136fc64eaf26db9b00c661286e1762.zip |
gpio / ACPI: Move event handling registration to gpiolib irqchip helpers
Since now we have irqchip helpers that the GPIO chip drivers are supposed
to use if possible, we can move the registration of ACPI events to happen
in these helpers. This seems to be more natural place and might encourage
GPIO chip driver writers to take advantage of the irqchip helpers.
We make the functions available to GPIO chip drivers via private gpiolib.h,
just in case generic irqchip helpers are not suitable.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 18b069e6ba03..330227581a25 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -519,6 +519,8 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip) { unsigned int offset; + acpi_gpiochip_free_interrupts(gpiochip); + /* Remove all IRQ mappings and delete the domain */ if (gpiochip->irqdomain) { for (offset = 0; offset < gpiochip->ngpio; offset++) @@ -612,6 +614,8 @@ int gpiochip_irqchip_add(struct gpio_chip *gpiochip, gpiochip->irq_base = irq_base; } + acpi_gpiochip_request_interrupts(gpiochip); + return 0; } EXPORT_SYMBOL_GPL(gpiochip_irqchip_add); |