powerpc: wii.dts: Add GPIO keys
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sat, 12 Jan 2019 16:21:24 +0000 (17:21 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 15 Jan 2019 00:17:09 +0000 (11:17 +1100)
The Wii has POWER and EJECT buttons, which are connected through
normalization logic to the GPIO controller (the length of an assertion
of these signals is always the same, regardless of how long the user
pressed the buttons).

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/boot/dts/wii.dts

index caf735fa11b70491e9197c1a20fe04105036946e..c406bdb4f36fbd439f572e76dc286494d702fc5e 100644 (file)
@@ -14,6 +14,7 @@
 
 /dts-v1/;
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 /*
  * This is commented-out for now.
                        panic-indicator;
                };
        };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               power {
+                       label = "Power Button";
+                       gpios = <&GPIO 0 GPIO_ACTIVE_HIGH>;
+                       linux,code = <KEY_POWER>;
+               };
+
+               eject {
+                       label = "Eject Button";
+                       gpios = <&GPIO 6 GPIO_ACTIVE_HIGH>;
+                       linux,code = <KEY_EJECTCD>;
+               };
+       };
 };