From 471947d6ff1c838fc035fe3776adf19b277c3d8c Mon Sep 17 00:00:00 2001 From: Jianqun Xu Date: Mon, 27 Mar 2017 08:58:14 +0800 Subject: [PATCH] arm: dts: rk3288-evb: use rockchip_key to replace adc_key Change-Id: I46df35c489bf15a159eb64a2d5e3d0b3510f6bef Signed-off-by: Jianqun Xu --- arch/arm/boot/dts/rk3288-evb.dtsi | 109 ++++++++++++++---------------- 1 file changed, 52 insertions(+), 57 deletions(-) diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi index 30fe23251f3b..d8981b7e1fca 100644 --- a/arch/arm/boot/dts/rk3288-evb.dtsi +++ b/arch/arm/boot/dts/rk3288-evb.dtsi @@ -91,6 +91,58 @@ 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>; @@ -158,63 +210,6 @@ #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 = ; - press-threshold-microvolt = <100000>; - }; - - button-down { - label = "Volume Down"; - linux,code = ; - press-threshold-microvolt = <300000>; - }; - - menu { - label = "Menu"; - linux,code = ; - press-threshold-microvolt = <640000>; - }; - - esc { - label = "Esc"; - linux,code = ; - press-threshold-microvolt = <1000000>; - }; - - home { - label = "Home"; - linux,code = ; - 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 = ; - 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"; -- 2.34.1