summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-baytrail.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2014-01-08 12:40:54 +0200
committerLinus Walleij <linus.walleij@linaro.org>2014-01-08 15:07:28 +0100
commit664e3e5ac64c8a1999e2d94bc307e5bcd17d3646 (patch)
tree70d7a7e03a4a672da14cce26b34b2a3e29a37fbe /drivers/pinctrl/pinctrl-baytrail.c
parent878756553271dd631ee7f06fe489103957753fdd (diff)
downloadlinux-next-664e3e5ac64c8a1999e2d94bc307e5bcd17d3646.tar.gz
gpio / ACPI: register to ACPI events automatically
Instead of asking each driver to register to ACPI events we can just call acpi_gpiochip_register_interrupts() for each chip that has an ACPI handle. The function checks chip->to_irq and if it is set to NULL (a GPIO driver that doesn't do interrupts) the function does nothing. We also add the a new header drivers/gpio/gpiolib.h that is used for functions internal to gpiolib and add ACPI GPIO chip registering functions to that header. Once that is done we can remove call to acpi_gpiochip_register_interrupts() from its only user, pinctrl-baytrail.c Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-baytrail.c')
-rw-r--r--drivers/pinctrl/pinctrl-baytrail.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index 31c8b3257a94..72e6a298a1e9 100644
--- a/drivers/pinctrl/pinctrl-baytrail.c
+++ b/drivers/pinctrl/pinctrl-baytrail.c
@@ -29,7 +29,6 @@
#include <linux/gpio.h>
#include <linux/irqdomain.h>
#include <linux/acpi.h>
-#include <linux/acpi_gpio.h>
#include <linux/platform_device.h>
#include <linux/seq_file.h>
#include <linux/io.h>
@@ -485,9 +484,6 @@ static int byt_gpio_probe(struct platform_device *pdev)
irq_set_handler_data(hwirq, vg);
irq_set_chained_handler(hwirq, byt_gpio_irq_handler);
-
- /* Register interrupt handlers for gpio signaled acpi events */
- acpi_gpiochip_request_interrupts(gc);
}
pm_runtime_enable(dev);