diff options
author | Peter Cai <peter@typeblog.net> | 2022-02-02 13:04:04 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-02-11 09:00:47 -0500 |
commit | 80d4c02b9324e7e0049582142474c9cc8630e27c (patch) | |
tree | 44d406100f1ffd0cbf16f766a74560f3cac9491d /cmd/scp03.c | |
parent | 0290146943af203c1a9e332e19ec76b414b0a771 (diff) |
button: adc: set state to pressed when the voltage is closest to nominal
In the Linux implementation of adc-keys
(drivers/input/keyboard/adc-keys.c), `press-threshold-microvolt` is not
really interpreted as a threshold, but rather as the "nominal voltage"
of the button. When the voltage read from the ADC is closest to a
button's `press-threshold-microvolt`, the button is considered pressed.
This patch reconciles the behavior of button-adc with Linux's adc-keys
such that device trees can be synchronized with minimal modifications.
Signed-off-by: Peter Cai <peter@typeblog.net>
Diffstat (limited to 'cmd/scp03.c')
0 files changed, 0 insertions, 0 deletions