Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1643137

[PATCH 11/12] arm64: dts: hi3660: add power key dts node

From Guodong Xu <guodong.xu@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 11/12] arm64: dts: hi3660: add power key dts node
Date 2017-05-17 10:40 +0200
Message-ID <tI2EX-J3-51@gated-at.bofh.it> (permalink)
References <tI2EV-J3-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Chen Jun <chenjun14@huawei.com>

We use gpio_034 as power key on hikey960, and set gpio with pull-up
state, when key press the voltage on the gpio will come to lower, and
power key event will be reported.

Signed-off-by: Chen Jun <chenjun14@huawei.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Guodong Xu <guodong.xu@linaro.org>
---
 arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
index 79735ee..6de86c0 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
@@ -10,6 +10,8 @@
 #include "hi3660.dtsi"
 #include "hikey960-pinctrl.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 
 / {
 	model = "HiKey960";
@@ -32,6 +34,21 @@
 		/* rewrite this at bootloader */
 		reg = <0x0 0x0 0x0 0x0>;
 	};
+
+	soc {
+		keys: gpio-keys {
+			compatible = "gpio-keys";
+			pinctrl-names = "default";
+			pinctrl-0 = <&pwr_key_pmx_func &pwr_key_cfg_func>;
+
+			power {
+				wakeup-source;
+				gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
+				label = "GPIO Power";
+				linux,code = <KEY_POWER>;
+			};
+		};
+	};
 };
 
 &i2c0 {
-- 
2.10.2

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/12] arm64: dts: hi3660: add device nodes Guodong Xu <guodong.xu@linaro.org> - 2017-05-17 10:40 +0200
  [PATCH 01/12] dt-bindings: arm: hisilicon: add bindings for HiKey960 board Guodong Xu <guodong.xu@linaro.org> - 2017-05-17 10:40 +0200
    Re: [PATCH 01/12] dt-bindings: arm: hisilicon: add bindings for  HiKey960 board Rob Herring <robh@kernel.org> - 2017-05-23 02:40 +0200
  [PATCH 02/12] arm64: dts: hisilicon: update compatible string for hikey960 Guodong Xu <guodong.xu@linaro.org> - 2017-05-17 10:40 +0200
    Re: [PATCH 02/12] arm64: dts: hisilicon: update compatible string  for hikey960 Rob Herring <robh@kernel.org> - 2017-05-23 02:40 +0200
  [PATCH 11/12] arm64: dts: hi3660: add power key dts node Guodong Xu <guodong.xu@linaro.org> - 2017-05-17 10:40 +0200
    Re: [PATCH 11/12] arm64: dts: hi3660: add power key dts node Rob Herring <robh@kernel.org> - 2017-05-23 02:50 +0200
  [PATCH 07/12] arm64: dts: hi3660: Add uarts nodes Guodong Xu <guodong.xu@linaro.org> - 2017-05-17 10:40 +0200
    Re: [PATCH 07/12] arm64: dts: hi3660: Add uarts nodes Rob Herring <robh@kernel.org> - 2017-05-23 02:50 +0200
      Re: [PATCH 07/12] arm64: dts: hi3660: Add uarts nodes Guodong Xu <guodong.xu@linaro.org> - 2017-05-23 11:30 +0200
  [PATCH 04/12] arm64: dts: hi3660: add resources for clock and reset Guodong Xu <guodong.xu@linaro.org> - 2017-05-17 10:50 +0200
    Re: [PATCH 04/12] arm64: dts: hi3660: add resources for clock and  reset Rob Herring <robh@kernel.org> - 2017-05-23 02:50 +0200
  [PATCH 09/12] arm64: dts: hi3660: Add pl031 rtc node Guodong Xu <guodong.xu@linaro.org> - 2017-05-17 10:50 +0200
    Re: [PATCH 09/12] arm64: dts: hi3660: Add pl031 rtc node Rob Herring <robh@kernel.org> - 2017-05-23 02:50 +0200
  [PATCH 06/12] arm64: dts: hi3660: add gpio dtsi file for Hisilicon Hi3660 SOC Guodong Xu <guodong.xu@linaro.org> - 2017-05-17 10:50 +0200
    Re: [PATCH 06/12] arm64: dts: hi3660: add gpio dtsi file for  Hisilicon Hi3660 SOC Rob Herring <robh@kernel.org> - 2017-05-23 02:50 +0200
      Re: [PATCH 06/12] arm64: dts: hi3660: add gpio dtsi file for  Hisilicon Hi3660 SOC Guodong Xu <guodong.xu@linaro.org> - 2017-05-23 13:30 +0200

csiph-web