aboutsummaryrefslogtreecommitdiff
path: root/drivers/button/button-adc.c
Commit message (Collapse)AuthorAgeFilesLines
* button: adc: set state to pressed when the voltage is closest to nominalPeter Cai2022-02-111-5/+16
| | | | | | | | | | | | | 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>
* button: adc: fix treshold typoNeil Armstrong2021-03-081-7/+7
| | | | | | | | | Fix the treshold typo in code by threshold. Fixes: c0165c85c3 ("button: add a simple Analog to Digital Converter device based button driver") Suggested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
* button: add a simple Analog to Digital Converter device based button driverMarek Szyprowski2021-02-181-0/+146
Add a simple Analog to Digital Converter device based button driver. This driver binds to the 'adc-keys' device tree node. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>