diff options
author | Paul Cercueil <paul@crapouillou.net> | 2021-03-22 00:09:29 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-03-25 19:14:08 +0100 |
commit | c9efb0ba281e88e2faec6ad919be509b6ab8ead6 (patch) | |
tree | 37ff7e7790bccaff1b9d2dee7fdf45c5a3aec4c3 /drivers/cpufreq/tegra194-cpufreq.c | |
parent | Input: gpio-keys - use hrtimer for release timer (diff) | |
download | linux-c9efb0ba281e88e2faec6ad919be509b6ab8ead6.tar.xz linux-c9efb0ba281e88e2faec6ad919be509b6ab8ead6.zip |
Input: gpio-keys - use hrtimer for software debounce, if possible
We want to be able to report the input event as soon as the debounce
delay elapsed. However, the current code does not really ensure that,
as it uses the jiffies-based schedule_delayed_work() API. With a small
enough HZ value (HZ <= 100), this results in some input events being
lost, when a key is quickly pressed then released (on a human's time
scale).
Switching to hrtimers fixes this issue, and will work even on extremely
low HZ values (tested at HZ=24). This is however only possible if
reading the GPIO is possible without sleeping. If this condition is not
met, the previous approach of using a jiffies-based timer is taken.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20210307222240.380583-3-paul@crapouillou.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/cpufreq/tegra194-cpufreq.c')
0 files changed, 0 insertions, 0 deletions