ACPI / gpio: Add irq_type when a GPIO is used as an interrupt
authorChristophe RICARD <christophe.ricard@gmail.com>
Wed, 23 Dec 2015 22:25:34 +0000 (23:25 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Jan 2016 02:20:25 +0000 (03:20 +0100)
commit52044723cd27aed6dad655a3bdf6142a8239ce74
treec0a6afa0467086e9f09887618cb7ec92f53132ec
parent55a93417c27c6ad1022d5f1121004c494735e8fa
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 <christophe-h.ricard@st.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/gpio/gpiolib-acpi.c
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.h