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


Groups > linux.kernel > #1480080

[PATCH v5 8/9] ARM: dts: Declare push button as GPIO key on stm32f429 boards

From Alexandre TORGUE <alexandre.torgue@st.com>
Newsgroups linux.kernel
Subject [PATCH v5 8/9] ARM: dts: Declare push button as GPIO key on stm32f429 boards
Date 2016-09-09 16:50 +0200
Message-ID <sfvhU-4gq-21@gated-at.bofh.it> (permalink)
References <sfvhU-4gq-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>

diff --git a/arch/arm/boot/dts/stm32429i-eval.dts b/arch/arm/boot/dts/stm32429i-eval.dts
index 6bfc595..0fd78e4 100644
--- a/arch/arm/boot/dts/stm32429i-eval.dts
+++ b/arch/arm/boot/dts/stm32429i-eval.dts
@@ -47,6 +47,7 @@
 
 /dts-v1/;
 #include "stm32f429.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "STMicroelectronics STM32429i-EVAL board";
@@ -82,6 +83,23 @@
 		};
 	};
 
+	gpio_keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		autorepeat;
+		button@0 {
+			label = "Wake up";
+			linux,code = <KEY_WAKEUP>;
+			gpios = <&gpioa 0 0>;
+		};
+		button@1 {
+			label = "Tamper";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpioc 13 0>;
+		};
+	};
+
 	usbotg_hs_phy: usbphy {
 		#phy-cells = <0>;
 		compatible = "usb-nop-xceiv";
diff --git a/arch/arm/boot/dts/stm32f429-disco.dts b/arch/arm/boot/dts/stm32f429-disco.dts
index 0140807..7d0415e 100644
--- a/arch/arm/boot/dts/stm32f429-disco.dts
+++ b/arch/arm/boot/dts/stm32f429-disco.dts
@@ -47,6 +47,7 @@
 
 /dts-v1/;
 #include "stm32f429.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "STMicroelectronics STM32F429i-DISCO board";
@@ -75,6 +76,18 @@
 			linux,default-trigger = "heartbeat";
 		};
 	};
+
+	gpio_keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		autorepeat;
+		button@0 {
+			label = "User";
+			linux,code = <KEY_HOME>;
+			gpios = <&gpioa 0 0>;
+		};
+	};
 };
 
 &clk_hse {
-- 
1.9.1

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


Thread

[PATCH v5 0/9] Add STM32 EXTI interrupt controller support Alexandre TORGUE <alexandre.torgue@st.com> - 2016-09-09 16:50 +0200
  [PATCH v5 7/9] ARM: dts: Add GPIO irq support to STM2F429 Alexandre TORGUE <alexandre.torgue@st.com> - 2016-09-09 16:50 +0200
  [PATCH v5 5/9] Documentation: dt-bindings: Add IRQ related properties of STM32 pinctrl Alexandre TORGUE <alexandre.torgue@st.com> - 2016-09-09 16:50 +0200
    Re: [PATCH v5 5/9] Documentation: dt-bindings: Add IRQ related  properties of STM32 pinctrl Linus Walleij <linus.walleij@linaro.org> - 2016-09-13 10:20 +0200
    Re: [PATCH v5 5/9] Documentation: dt-bindings: Add IRQ related  properties of STM32 pinctrl Linus Walleij <linus.walleij@linaro.org> - 2016-09-13 10:20 +0200
      Re: [PATCH v5 5/9] Documentation: dt-bindings: Add IRQ related  properties of STM32 pinctrl Alexandre Torgue <alexandre.torgue@st.com> - 2016-09-13 14:40 +0200
        Re: [PATCH v5 5/9] Documentation: dt-bindings: Add IRQ related  properties of STM32 pinctrl Linus Walleij <linus.walleij@linaro.org> - 2016-09-13 14:50 +0200
  [PATCH v5 8/9] ARM: dts: Declare push button as GPIO key on stm32f429 boards Alexandre TORGUE <alexandre.torgue@st.com> - 2016-09-09 16:50 +0200
  [PATCH v5 3/9] ARM: STM32: Select external interrupts controller Alexandre TORGUE <alexandre.torgue@st.com> - 2016-09-09 16:50 +0200
  [PATCH v5 9/9] ARM: config: Enable GPIO Key driver in stm32_defconfig Alexandre TORGUE <alexandre.torgue@st.com> - 2016-09-09 16:50 +0200
  [PATCH v5 4/9] ARM: dts: Add EXTI controller node to stm32f429 Alexandre TORGUE <alexandre.torgue@st.com> - 2016-09-09 16:50 +0200
  [PATCH v5 6/9] pinctrl: Add IRQ support to STM32 gpios Alexandre TORGUE <alexandre.torgue@st.com> - 2016-09-09 16:50 +0200
    Re: [PATCH v5 6/9] pinctrl: Add IRQ support to STM32 gpios Linus Walleij <linus.walleij@linaro.org> - 2016-09-13 10:20 +0200

csiph-web