Skip to content
Commit 80d4c02b authored by Peter Cai's avatar Peter Cai Committed by Tom Rini
Browse files

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: default avatarPeter Cai <peter@typeblog.net>
parent 02901469
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment