]> rtime.felk.cvut.cz Git - linux-imx.git/commit
gpio / ACPI: Handle ACPI events in accordance with the spec
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 9 Apr 2013 13:57:25 +0000 (15:57 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 10 Apr 2013 21:41:17 +0000 (23:41 +0200)
commit7fc7acb9a0b0ff3ffdf21818fe0735ebaf4fecb8
treeb7dcfc4ecf9a1ef1099f0f658b381139c8689746
parentfdc7a9f85ab4c19acfc21e4da6ff8b7000bb686c
gpio / ACPI: Handle ACPI events in accordance with the spec

Commit 0d1c28a (gpiolib-acpi: Add ACPI5 event model support to gpio.)
that added support for ACPI events signalled through GPIO interrupts
covered only GPIO pins whose numbers are less than or equal to 255.
However, there may be GPIO pins with numbers greater than 255 and
the ACPI spec (ACPI 5.0, Section 5.6.5.1) requires the _EVT method
to be used for handling events corresponding to those pins.

Moreover, according to the spec, _EVT is the default mechanism
for handling all ACPI events signalled through GPIO interrupts,
so if the _Exx/_Lxx method is not present for the given pin,
_EVT should be used instead.  If present, though, _Exx/_Lxx take
precedence over _EVT which shouldn't be executed in that case
(ACPI 5.0, Section 5.6.5.3).

Modify acpi_gpiochip_request_interrupts() to follow the spec as
described above and add acpi_gpiochip_free_interrupts() needed
to free interrupts associated with _EVT.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-acpi.c
include/linux/acpi_gpio.h