From 8502633ed831fb17441a348b14b95d88118551f4 Mon Sep 17 00:00:00 2001 From: Jianqun Xu Date: Mon, 27 Mar 2017 09:36:20 +0800 Subject: [PATCH] Input: add document for rockchip keys Change-Id: I3f8f4522e6279e3f5faf3f293936c835ce8fc6b7 Signed-off-by: Jianqun Xu --- .../bindings/input/rockchip-keys.txt | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/rockchip-keys.txt diff --git a/Documentation/devicetree/bindings/input/rockchip-keys.txt b/Documentation/devicetree/bindings/input/rockchip-keys.txt new file mode 100644 index 000000000000..7b3fba3a6a67 --- /dev/null +++ b/Documentation/devicetree/bindings/input/rockchip-keys.txt @@ -0,0 +1,69 @@ +ROCKCHIP ADC attached resistor ladder buttons +------------------------------------ + +Required properties: + - compatible: "rockchip,key" + - io-channels: Phandle to an ADC channel + +Each button (key) is represented as a sub-node of "rockchip,key": + +Required subnode-properties: + - label: Descriptive name of the key. + - linux,code: Keycode to emit. + - rockchip,adc_value:: Voltage ADC input when this key is pressed. + +Example: + +#include + + rk_key: rockchip-key { + compatible = "rockchip,key"; + status = "okay"; + + io-channels = <&saradc 1>; + + vol-up-key { + linux,code = <115>; + label = "volume up"; + rockchip,adc_value = <1>; + }; + + vol-down-key { + linux,code = <114>; + label = "volume down"; + rockchip,adc_value = <170>; + }; + + power-key { + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + linux,code = <116>; + pinctrl-names = "default"; + pinctrl-0 = <&pwrbtn>; + label = "power"; + gpio-key,wakeup; + }; + + menu-key { + linux,code = <59>; + label = "menu"; + rockchip,adc_value = <355>; + }; + + home-key { + linux,code = <102>; + label = "home"; + rockchip,adc_value = <746>; + }; + + back-key { + linux,code = <158>; + label = "back"; + rockchip,adc_value = <560>; + }; + + camera-key { + linux,code = <212>; + label = "camera"; + rockchip,adc_value = <450>; + }; + }; -- 2.34.1