From 52044723cd27aed6dad655a3bdf6142a8239ce74 Mon Sep 17 00:00:00 2001 From: Christophe RICARD Date: Wed, 23 Dec 2015 23:25:34 +0100 Subject: ACPI / gpio: Add irq_type when a GPIO is used as an interrupt When a GPIO is used as an interrupt in ACPI, the irq_type was not available for device driver. Make available polarity and triggering information in acpi_find_gpio by renaming acpi_gpio_info field active_low to polarity and adding triggering field (edge/level). For sanity, in gpiolib.c replace info.active_low by "info.polarity == GPIO_ACTIVE_LOW". Set the irq_type if necessary in acpi_dev_gpio_irq_get. Signed-off-by: Christophe Ricard Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki --- drivers/gpio/gpiolib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpio/gpiolib.h') diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h index 98ab08c0aa2d..5ac3b88a2e0a 100644 --- a/drivers/gpio/gpiolib.h +++ b/drivers/gpio/gpiolib.h @@ -26,7 +26,8 @@ struct acpi_device; */ struct acpi_gpio_info { bool gpioint; - bool active_low; + int polarity; + int triggering; }; /* gpio suffixes used for ACPI and device tree lookup */ -- cgit v1.2.3