arm64: dts: lx2160a-clearfog-itx: add power button support
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 8 Jan 2021 23:09:58 +0000 (23:09 +0000)
committerShawn Guo <shawnguo@kernel.org>
Mon, 18 Jan 2021 00:13:00 +0000 (08:13 +0800)
Add support for the power button.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi

index f3741a32e86867ed8a26aae6dad08dd70f3c44ed..2b63235ca627009926b0654de0a187a836e9736b 100644 (file)
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "fsl-lx2160a-cex7.dtsi"
+#include <dt-bindings/input/linux-event-codes.h>
 
 / {
        aliases {
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               key {
+                       label = "power";
+                       linux,can-disable;
+                       linux,code = <KEY_POWER>;
+                       gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
+               };
+       };
 };
 
 &emdio2 {