Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1650293
| From | Guodong Xu <guodong.xu@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 10/12] arm64: dts: hi3660: add power key dts node |
| Date | 2017-05-25 10:30 +0200 |
| Message-ID | <tKWjE-5Mt-15@gated-at.bofh.it> (permalink) |
| References | <tKW9X-5J4-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
index c25fff9..7aac35b 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";
@@ -34,6 +36,19 @@
/* rewrite this at bootloader */
reg = <0x0 0x0 0x0 0x0>;
};
+
+ 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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/12] arm64: dts: hi3660: add device nodes Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:20 +0200 [PATCH v2 06/12] arm64: dts: hi3660: add gpio dtsi file for Hisilicon Hi3660 SOC Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 07/12] arm64: dts: hi3660: Add uarts nodes Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 04/12] arm64: dts: hi3660: add resources for clock and reset Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 10/12] arm64: dts: hi3660: add power key dts node Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 09/12] arm64: dts: hi3660: Add pl031 rtc node Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 11/12] arm64: dts: hikey960: add LED nodes Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 02/12] arm64: dts: hisilicon: update compatible string for hikey960 Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 03/12] arm64: dts: hikey960: pinctrl: add more pinmux and pinconfig Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 08/12] arm64: dts: hikey960: add WL1837 Bluetooth device node Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 01/12] dt-bindings: arm: hisilicon: add bindings for HiKey960 board Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 05/12] arm64: dts: Add I2C nodes for Hi3660 Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200 [PATCH v2 12/12] arm64: dts: hi3660: add spi device nodes Guodong Xu <guodong.xu@linaro.org> - 2017-05-25 10:30 +0200
csiph-web