]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
platform/x86: Add driver for ACPI INT0002 Virtual GPIO device
authorHans de Goede <hdegoede@redhat.com>
Mon, 12 Jun 2017 20:55:46 +0000 (22:55 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 14 Jun 2017 22:55:44 +0000 (00:55 +0200)
commit63dada87f7ef7d4a536765c816fbbe7c4b9f3c85
treed2e7dc3fa453fe4d67ed43a57ff7e9ec5495b1a2
parentdc15e71eefc766373833602c353cf6b4f49da036
platform/x86: Add driver for ACPI INT0002 Virtual GPIO device

Some peripherals on Bay Trail and Cherry Trail platforms signal a
Power Management Event (PME) to the Power Management Controller (PMC)
to wakeup the system. When this happens software needs to explicitly
clear the PME bus 0 status bit in the GPE0a_STS register to avoid an
IRQ storm on IRQ 9.

This is modelled in ACPI through the INT0002 ACPI device, which is
called a "Virtual GPIO controller" in ACPI because it defines the
event handler to call when the PME triggers through _AEI and _L02
methods as would be done for a real GPIO interrupt in ACPI.

This commit adds a driver which registers the Virtual GPIOs expected
by the DSDT on these devices, letting gpiolib-acpi claim the
virtual GPIO and install a GPIO-interrupt handler which call the _L02
handler as it would for a real GPIO controller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/platform/x86/Kconfig
drivers/platform/x86/Makefile
drivers/platform/x86/intel_int0002_vgpio.c [new file with mode: 0644]