]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: dts: qcom: msm8974-honami: Introduce gpio-keys
authorBjorn Andersson <bjorn.andersson@sonymobile.com>
Wed, 21 Oct 2015 04:57:46 +0000 (21:57 -0700)
committerAndy Gross <agross@codeaurora.org>
Wed, 9 Dec 2015 05:33:11 +0000 (23:33 -0600)
Introduce a gpio-keys node defining the physical keys of the Honami and
the associated pinctrl state.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts

index 5768c97bb124bfd84f3be8ddafb634f49b97c1a3..d30f407b04d3300476ec50dc4a7ca0512c4f9952 100644 (file)
@@ -2,6 +2,7 @@
 #include "qcom-pm8841.dtsi"
 #include "qcom-pm8941.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 
 / {
                stdout-path = "serial0:115200n8";
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               input-name = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_keys_pin_a>;
+
+               volume-down {
+                       label = "volume_down";
+                       gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+               };
+
+               camera-snapshot {
+                       label = "camera_snapshot";
+                       gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_CAMERA>;
+               };
+
+               camera-focus {
+                       label = "camera_focus";
+                       gpios = <&pm8941_gpios 4 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_CAMERA_FOCUS>;
+               };
+
+               volume-up {
+                       label = "volume_up";
+                       gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_VOLUMEUP>;
+               };
+       };
+
        memory@0 {
                reg = <0 0x40000000>, <0x40000000 0x40000000>;
                device_type = "memory";
                                pins = "gpio21";
                                function = "normal";
                        };
+
+                       gpio_keys_pin_a: gpio-keys-active {
+                               pins = "gpio2", "gpio3", "gpio4", "gpio5";
+                               function = "normal";
+
+                               bias-pull-up;
+                               power-source = <PM8941_GPIO_S3>;
+                       };
                };
 
                coincell@2800 {