arm: dts: rk3288-evb: use rockchip_key to replace adc_key
authorJianqun Xu <jay.xu@rock-chips.com>
Mon, 27 Mar 2017 00:58:14 +0000 (08:58 +0800)
committerJianqun Xu <jay.xu@rock-chips.com>
Mon, 27 Mar 2017 01:40:00 +0000 (09:40 +0800)
Change-Id: I46df35c489bf15a159eb64a2d5e3d0b3510f6bef
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
arch/arm/boot/dts/rk3288-evb.dtsi

index 30fe23251f3b4da14582e094aaf44ff7734eeb48..d8981b7e1fcac1680b527fa5fc82c724d4f99d56 100644 (file)
                pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
        };
 
+       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>;
+               };
+       };
+
        panel: panel {
                compatible ="lg,lp079qx1-sp0v", "simple-panel";
                backlight = <&backlight>;
                #clock-cells = <0>;
        };
 
-       adc-keys {
-               compatible = "adc-keys";
-               io-channels = <&saradc 1>;
-               io-channel-names = "buttons";
-               poll-interval = <100>;
-               keyup-threshold-microvolt = <1800000>;
-
-               button-up {
-                       label = "Volume Up";
-                       linux,code = <KEY_VOLUMEUP>;
-                       press-threshold-microvolt = <100000>;
-               };
-
-               button-down {
-                       label = "Volume Down";
-                       linux,code = <KEY_VOLUMEDOWN>;
-                       press-threshold-microvolt = <300000>;
-               };
-
-               menu {
-                       label = "Menu";
-                       linux,code = <KEY_MENU>;
-                       press-threshold-microvolt = <640000>;
-               };
-
-               esc {
-                       label = "Esc";
-                       linux,code = <KEY_ESC>;
-                       press-threshold-microvolt = <1000000>;
-               };
-
-               home  {
-                       label = "Home";
-                       linux,code = <KEY_HOME>;
-                       press-threshold-microvolt = <1300000>;
-               };
-       };
-
-       gpio-keys {
-               compatible = "gpio-keys";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               autorepeat;
-
-               pinctrl-names = "default";
-               pinctrl-0 = <&pwrbtn>;
-
-               button@0 {
-                       gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
-                       linux,code = <KEY_POWER>;
-                       label = "GPIO Key Power";
-                       linux,input-type = <1>;
-                       gpio-key,wakeup = <1>;
-                       debounce-interval = <100>;
-               };
-       };
-
        vccadc_ref: vccadc-ref {
                compatible = "regulator-fixed";
                regulator-name = "vcc1v8_sys";