Re: [PATCH 3/3] ARM: dts: msm8974-hammerhead: Introduce gpio-keys nodes
From: Bjorn Andersson <hidden>
Date: 2016-07-18 17:39:37
Also in:
linux-arm-msm
On Sun 17 Jul 03:52 PDT 2016, Bhushan Shah wrote:
This introduces the gpio-keys node for keys of hammerhead and pinctrl state associated with it. Cc: Andy Gross <redacted> Cc: Bjorn Andersson <redacted>
Reviewed-by: Bjorn Andersson <redacted> Regards, Bjorn
quoted hunk
Cc: David Brown <redacted> Cc: Rob Herring <redacted> Cc: Mark Rutland <redacted> Cc: Russell King <redacted> Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Bhushan Shah <redacted> --- .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+)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 29fa0bb..12b6a14 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> / {@@ -252,6 +253,27 @@ 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 {@@ -261,6 +283,14 @@ pins = "gpio21"; function = "normal"; }; + + gpio_keys_pin_a: gpio-keys-active { + pins = "gpio2", "gpio3"; + function = "normal"; + + bias-pull-up; + power-source = <PM8941_GPIO_S3>; + }; }; }; };-- 2.9.0
-- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html