devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: boot: dts: am437x-idk: add gpio-based power key
@ 2014-12-26 20:35 Felipe Balbi
  2014-12-26 20:53 ` [PATCH v2] " Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2014-12-26 20:35 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
	devicetree, Felipe Balbi

AM437x IDK board has a User Switch which we can
program to whatever we want. Because this board
doesn't have a PMIC which can give us power button
presses, let's use this user switch as a gpio-keys
power button.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---

depends on [1]. Boot logs at [2]. Note that this can rather easily
be folded into the original patch if so desired.

[1] http://marc.info/?l=linux-omap&m=141928747902983&w=2
[2] http://hastebin.com/xasuyinizu

 arch/arm/boot/dts/am437x-idk-evm.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/am437x-idk-evm.dts b/arch/arm/boot/dts/am437x-idk-evm.dts
index b52dd0a..86f6219 100644
--- a/arch/arm/boot/dts/am437x-idk-evm.dts
+++ b/arch/arm/boot/dts/am437x-idk-evm.dts
@@ -96,6 +96,18 @@
 		regulator-boot-on;
 		vin-supply = <&v1_5dreg>;
 	};
+
+	gpio_keys: gpio_keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		switch@0 {
+			label = "power-button";
+			linux,code = <KEY_POWER>;
+			gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
+		};
+	};
 };
 
 &am43xx_pinmux {
-- 
2.2.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-08  0:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-26 20:35 [PATCH] arm: boot: dts: am437x-idk: add gpio-based power key Felipe Balbi
2014-12-26 20:53 ` [PATCH v2] " Felipe Balbi
     [not found]   ` <1419627193-20838-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2015-01-08  0:12     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).