• R
    gpio / ACPI: Handle ACPI events in accordance with the spec · 7fc7acb9
    Rafael J. Wysocki 提交于
    Commit 0d1c28a4 (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: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com>
    Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
    7fc7acb9
gpiolib-acpi.c 5.8 KB