1ROCKCHIP ADC attached resistor ladder buttons 2------------------------------------ 3 4Required properties: 5 - compatible: "rockchip,key" 6 - io-channels: Phandle to an ADC channel 7 8Each button (key) is represented as a sub-node of "rockchip,key": 9 10Required 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. 14 15Example: 16 17#include <dt-bindings/input/input.h> 18 19 rk_key: rockchip-key { 20 compatible = "rockchip,key"; 21 status = "okay"; 22 23 io-channels = <&saradc 1>; 24 25 vol-up-key { 26 linux,code = <115>; 27 label = "volume up"; 28 rockchip,adc_value = <1>; 29 }; 30 31 vol-down-key { 32 linux,code = <114>; 33 label = "volume down"; 34 rockchip,adc_value = <170>; 35 }; 36 37 power-key { 38 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; 39 linux,code = <116>; 40 pinctrl-names = "default"; 41 pinctrl-0 = <&pwrbtn>; 42 label = "power"; 43 gpio-key,wakeup; 44 }; 45 46 menu-key { 47 linux,code = <59>; 48 label = "menu"; 49 rockchip,adc_value = <355>; 50 }; 51 52 home-key { 53 linux,code = <102>; 54 label = "home"; 55 rockchip,adc_value = <746>; 56 }; 57 58 back-key { 59 linux,code = <158>; 60 label = "back"; 61 rockchip,adc_value = <560>; 62 }; 63 64 camera-key { 65 linux,code = <212>; 66 label = "camera"; 67 rockchip,adc_value = <450>; 68 }; 69 }; 70