arm64: tegra: Add gpio-keys nodes for Darcy
authorMark Zhang <markz@nvidia.com>
Fri, 11 Jan 2019 02:38:47 +0000 (10:38 +0800)
committerThierry Reding <treding@nvidia.com>
Fri, 25 Jan 2019 12:37:05 +0000 (13:37 +0100)
Add gpio-keys nodes for the power button.

Signed-off-by: Mark Zhang <markz@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi

index ac52286ab9ab1e837b396907d3021ad853664790..65372263d3a8d6be7c8aa91b75af30eadc1ab2f4 100644 (file)
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/input/gpio-keys.h>
 #include "tegra210.dtsi"
 
 / {
                };
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               status = "okay";
+
+               power {
+                       debounce-interval = <30>;
+                       gpios = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_LOW>;
+                       label = "Power";
+                       linux,code = <KEY_POWER>;
+                       wakeup-event-action = <EV_ACT_ASSERTED>;
+                       wakeup-source;
+               };
+       };
+
        cpus {
                cpu@0 {
                        enable-method = "psci";