]> git.baikalelectronics.ru Git - kernel.git/commit
Input: axp20x-pek - revert "always register interrupt handlers" change
authorHans de Goede <hdegoede@redhat.com>
Sun, 9 Jan 2022 07:09:20 +0000 (23:09 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 9 Jan 2022 07:17:55 +0000 (23:17 -0800)
commita3362ec03c10339b671894e264e3ba47c766fbcc
treedd409aa51b1af103fe053f5953d19f13418aebef
parent0e821ed1fba9bb24ae587d043b80709205bb562f
Input: axp20x-pek - revert "always register interrupt handlers" change

The power button on Cherry Trail systems with an AXP288 PMIC is connected
to both the power button pin of the PMIC as well as to a power button GPIO
on the Cherry Trail SoC itself. This leads to double power button event
reporting which is a problem.

Since reporting power button presses through the PMIC is not supported on
all PMICs used on Cherry Trail systems, we want to keep the GPIO
power button events, so the axp20x-pek code checks for the presence of
a GPIO power button and in that case does not register its input-device.

On most systems the GPIO power button also can wake-up the system from
suspend, so the axp20x-pek driver would also not register its interrupt
handler. But on some systems there was a bug causing wakeup by the GPIO
power button handler to not work.

Commit f86a7edf4f5a ("Input: axp20x-pek - always register interrupt
handlers") was added as a work around for this registering the axp20x-pek
interrupts, but not the input-device on Cherry Trail systems.

In the mean time the root-cause of the GPIO power button wakeup events
not working has been found and fixed by the "pinctrl: cherryview: Do not
allow the same interrupt line to be used by 2 pins" patch,
so this is no longer necessary.

This reverts the workaround going back to only registering the
interrupt handlers on systems where we also register the input-device.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20220106111647.66520-1-hdegoede@redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/axp20x-pek.c