From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bhushan Shah Subject: [PATCH 3/3] ARM: dts: msm8974-hammerhead: Introduce gpio-keys nodes Date: Sun, 17 Jul 2016 16:22:08 +0530 Message-ID: <20160717105208.9596-4-bshah@kde.org> References: <20160717105208.9596-1-bshah@kde.org> Return-path: Received: from mail-pa0-f66.google.com ([209.85.220.66]:35996 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750865AbcGQKzJ (ORCPT ); Sun, 17 Jul 2016 06:55:09 -0400 In-Reply-To: <20160717105208.9596-1-bshah@kde.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org Cc: Bhushan Shah , Andy Gross , Bjorn Andersson , David Brown , Rob Herring , Mark Rutland , Russell King , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, devicetree@vger.kernel.org This introduces the gpio-keys node for keys of hammerhead and pinctrl state associated with it. Cc: Andy Gross Cc: Bjorn Andersson Cc: David Brown Cc: Rob Herring Cc: Mark Rutland Cc: Russell King Cc: linux-arm-msm@vger.kernel.org Cc: linux-soc@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Bhushan Shah --- .../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 +#include #include / { @@ -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 = ; + }; + + volume-down { + label = "volume_down"; + gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + }; + }; }; &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 = ; + }; }; }; }; -- 2.9.0