1 ROCKCHIP ADC attached resistor ladder buttons
2 ------------------------------------
5 - compatible: "rockchip,key"
6 - io-channels: Phandle to an ADC channel
8 Each button (key) is represented as a sub-node of "rockchip,key":
10 Required subnode-properties:
11 - label: Descriptive name of the key.
12 - linux,code: Keycode to emit.
13 - rockchip,adc_value:: Voltage ADC input when this key is pressed.
17 #include <dt-bindings/input/input.h>
19 rk_key: rockchip-key {
20 compatible = "rockchip,key";
23 io-channels = <&saradc 1>;
28 rockchip,adc_value = <1>;
33 label = "volume down";
34 rockchip,adc_value = <170>;
38 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
40 pinctrl-names = "default";
41 pinctrl-0 = <&pwrbtn>;
49 rockchip,adc_value = <355>;
55 rockchip,adc_value = <746>;
61 rockchip,adc_value = <560>;
67 rockchip,adc_value = <450>;