diff options
author | Bhushan Shah <bshah@kde.org> | 2016-07-29 11:39:10 +0530 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2016-08-23 23:05:56 -0500 |
commit | f7af7de89fd50cc2d7aa092bb9a5e61654d65850 (patch) | |
tree | 16faf5a6d2bd865812f658326af90834489f3d29 /arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | |
parent | b8066645f6c1783434cc1ef66f57a8f4384dcdcb (diff) | |
download | lwn-f7af7de89fd50cc2d7aa092bb9a5e61654d65850.tar.gz lwn-f7af7de89fd50cc2d7aa092bb9a5e61654d65850.zip |
ARM: dts: msm8974-hammerhead: Introduce gpio-keys nodes
This introduces the gpio-keys node for keys of hammerhead and pinctrl
state associated with it.
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: David Brown <david.brown@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-soc@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Bhushan Shah <bshah@kde.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts')
-rw-r--r-- | arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts index df957cb1f6d3..c0fb4a698c56 100644 --- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts @@ -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> / { @@ -223,4 +224,39 @@ status = "ok"; }; + gpio-keys { + compatible = "gpio-keys"; + input-name = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys_pin_a>; + + volume-up { + label = "volume_up"; + gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = <KEY_VOLUMEUP>; + }; + + volume-down { + label = "volume_down"; + gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = <KEY_VOLUMEDOWN>; + }; + }; +}; + +&spmi_bus { + pm8941@0 { + gpios@c000 { + gpio_keys_pin_a: gpio-keys-active { + pins = "gpio2", "gpio3"; + function = "normal"; + + bias-pull-up; + power-source = <PM8941_GPIO_S3>; + }; + }; + }; }; |