Skip to contentSkip to conversation

ARM: tegra: enable gpio-keys on dalmore

PATCH Applied Laxman Dewangan 2 participants 2 messages Jul 10, 2013 – Jul 15, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ARM: tegra: enable gpio-keys on dalmore

Dalmore have the keys mounted on board which are connected to different pins of Tegra.

Add the keys entry in DTS file to enable key functionality. This will enable KEY_POWER, KEY_HOME, KEY_VOLUMEUP and KEY_VOLUMEDOWN.

---
Changes from V1:
- Reorder the nodes

Changes from V2:
- Remove unwanted line insertion.
- Rename VolumeUP/Volume down lables.

 arch/arm/boot/dts/tegra114-dalmore.dts |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra114-dalmore.dts +29 -0
index cb640eb..a42bfa4 100644
@@ -883,6 +883,35 @@
 		};
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		home {
+			label = "Home";
+			gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
+			linux,code = <102>; /* KEY_HOME */
+		};
+
+		power {
+			label = "Power";
+			gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
+			linux,code = <116>; /* KEY_POWER */
+			gpio-key,wakeup;
+		};
+
+		volume_down {
+			label = "Volume Down";
+			gpios = <&gpio TEGRA_GPIO(R, 1) GPIO_ACTIVE_LOW>;
+			linux,code = <114>; /* KEY_VOLUMEDOWN */
+		};
+
+		volume_up {
+			label = "Volume Up";
+			gpios = <&gpio TEGRA_GPIO(R, 2) GPIO_ACTIVE_LOW>;
+			linux,code = <115>; /* KEY_VOLUMEUP */
+		};
+	};
+
 	regulators {
 		compatible = "simple-bus";
 		#address-cells = <1>;
Signature · 1 line
1.7.1.1
#1 lore raw
Quoted 6 lines · Laxman Dewangan

Dalmore have the keys mounted on board which are connected to different pins of Tegra.

Add the keys entry in DTS file to enable key functionality. This will enable KEY_POWER, KEY_HOME, KEY_VOLUMEUP and KEY_VOLUMEDOWN.

I have applied this to Tegra's for-3.12/dt branch.