]> 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)
commit9b12d497105fc3a8ac3cb1382a8df205110896af
tree8f43e66aad7437dfc2167e81a18133fbc49bf41a
parenta0bbb9ae4222b0b7c1f4e52498350e5f6bbfc879
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