]> git.baikalelectronics.ru Git - kernel.git/commit
Input: pm8941-pwrkey - add software key press debouncing support
authorDavid Collins <collinsd@codeaurora.org>
Mon, 25 Apr 2022 01:20:05 +0000 (18:20 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 25 Apr 2022 01:25:13 +0000 (18:25 -0700)
commit0b65118e6ba3024b8d9330cbca9b4c8b439d2057
tree8f43e66aad7437dfc2167e81a18133fbc49bf41a
parent8ac8904bf9c7da69456731b890dd4e5839e2341a
Input: pm8941-pwrkey - add software key press debouncing support

On certain PMICs, an unexpected assertion of KPDPWR_DEB (the
positive logic hardware debounced power key signal) may be seen
during the falling edge of KPDPWR_N (i.e. a power key press) when
it occurs close to the rising edge of SLEEP_CLK.  This then
triggers a spurious KPDPWR interrupt.

Handle this issue by adding software debouncing support to ignore
key events that occur within the hardware debounce delay after the
most recent key release event.

Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
Link: https://lore.kernel.org/r/20220422191239.6271-5-quic_amelende@quicinc.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/pm8941-pwrkey.c