summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.h
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2014-07-25 09:54:48 +0300
committerLinus Walleij <linus.walleij@linaro.org>2014-07-28 12:23:57 +0200
commitafa82fab5e136fc64eaf26db9b00c661286e1762 (patch)
tree551a6268bc2fc528e2420dfd41db45e1f83d92f0 /drivers/gpio/gpiolib.h
parent7f87210eff7a26a0215b493e9dd7322b16d8dc72 (diff)
downloadop-kernel-dev-afa82fab5e136fc64eaf26db9b00c661286e1762.zip
op-kernel-dev-afa82fab5e136fc64eaf26db9b00c661286e1762.tar.gz
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.h')
-rw-r--r--drivers/gpio/gpiolib.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index 7fcb645..9db2b6a 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -31,12 +31,21 @@ struct acpi_gpio_info {
void acpi_gpiochip_add(struct gpio_chip *chip);
void acpi_gpiochip_remove(struct gpio_chip *chip);
+void acpi_gpiochip_request_interrupts(struct gpio_chip *chip);
+void acpi_gpiochip_free_interrupts(struct gpio_chip *chip);
+
struct gpio_desc *acpi_get_gpiod_by_index(struct device *dev, int index,
struct acpi_gpio_info *info);
#else
static inline void acpi_gpiochip_add(struct gpio_chip *chip) { }
static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { }
+static inline void
+acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { }
+
+static inline void
+acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { }
+
static inline struct gpio_desc *
acpi_get_gpiod_by_index(struct device *dev, int index,
struct acpi_gpio_info *info)
OpenPOWER on IntegriCloud