From: Hans de Goede <hidden> Date: 2017-05-19 14:06:29
acpi_dev_found checks that there is a matching ACPI node, but it
may be disabled (_STA method returns 0) in which case the
soc_button_array driver will not bind to it and axp20x-pek should
handle the power-button.
This commit switches from acpi_dev_found to acpi_dev_present to
avoid not registering an input-dev for the powerbutton when there
is a disabled PNP0C40 device.
The ACPI-6.0 standard defines a standard gpio button device using
the ACPI0011 HID replacing the custom PNP0C40 gpio device, many
newer devices define both PNP0C40 and ACPI0011 devices enabling one
or the other depending on whether the BIOS thinks it is going to boot
Android or Windows.
This commit adds a check for the ACPI0011 device, so that if
either device is present *and* enabled we don't register an input-dev
for the powerbutton.
Signed-off-by: Hans de Goede <redacted>
---
Changes in v2:
-Switch from acpi_dev_found to acpi_dev_present
---
drivers/input/misc/axp20x-pek.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
From: Hans de Goede <hidden> Date: 2017-05-19 14:06:35
At least on devices with the AXP288 PMIC the device is expected to
wakeup from suspend when the power-button gets pressed, add support
for this.
Signed-off-by: Hans de Goede <redacted>
---
drivers/input/misc/axp20x-pek.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
From: Hans de Goede <hidden> Date: 2017-05-19 14:13:29
Hi,
Note this series is v2, something went wrong causing that to
not show in the Subject, sorry.
Regards,
Hans
On 19-05-17 16:06, Hans de Goede wrote:
quoted hunk
acpi_dev_found checks that there is a matching ACPI node, but it
may be disabled (_STA method returns 0) in which case the
soc_button_array driver will not bind to it and axp20x-pek should
handle the power-button.
This commit switches from acpi_dev_found to acpi_dev_present to
avoid not registering an input-dev for the powerbutton when there
is a disabled PNP0C40 device.
The ACPI-6.0 standard defines a standard gpio button device using
the ACPI0011 HID replacing the custom PNP0C40 gpio device, many
newer devices define both PNP0C40 and ACPI0011 devices enabling one
or the other depending on whether the BIOS thinks it is going to boot
Android or Windows.
This commit adds a check for the ACPI0011 device, so that if
either device is present *and* enabled we don't register an input-dev
for the powerbutton.
Signed-off-by: Hans de Goede <redacted>
---
Changes in v2:
-Switch from acpi_dev_found to acpi_dev_present
---
drivers/input/misc/axp20x-pek.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)