ARM: tegra: cardhu: Add power and volume keys
authorThierry Reding <treding@nvidia.com>
Thu, 18 Dec 2014 13:58:20 +0000 (14:58 +0100)
committerThierry Reding <treding@nvidia.com>
Mon, 4 May 2015 11:58:26 +0000 (13:58 +0200)
The Cardhu has a power key on the top-right as well as volume up and
volume down keys on the right side.

Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm/boot/dts/tegra30-cardhu.dtsi

index a1b682ea01bd70ab94025cd12a4d5205d45f9db7..439634183e2530786052f5138a65eca852503dce 100644 (file)
@@ -1,3 +1,4 @@
+#include <dt-bindings/input/input.h>
 #include "tegra30.dtsi"
 
 /**
                         <&tegra_car TEGRA30_CLK_EXTERN1>;
                clock-names = "pll_a", "pll_a_out0", "mclk";
        };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               power {
+                       label = "Power";
+                       interrupt-parent = <&pmic>;
+                       interrupts = <2 0>;
+                       linux,code = <KEY_POWER>;
+                       debounce-interval = <100>;
+                       gpio-key,wakeup;
+               };
+
+               volume-down {
+                       label = "Volume Down";
+                       gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+                       debounce-interval = <10>;
+               };
+
+               volume-up {
+                       label = "Volume Up";
+                       gpios = <&gpio TEGRA_GPIO(R, 1) GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEUP>;
+                       debounce-interval = <10>;
+               };
+       };
 };