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.neuschae...@gmx.net>
---
 arch/powerpc/boot/dts/wii.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts
index 864e5a17aa1d..64f886a6327f 100644
--- a/arch/powerpc/boot/dts/wii.dts
+++ b/arch/powerpc/boot/dts/wii.dts
@@ -14,6 +14,7 @@
 
 /dts-v1/;
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 /*
  * This is commented-out for now.
@@ -249,5 +250,21 @@
                        gpios = <&GPIO 8 GPIO_ACTIVE_HIGH>;
                };
        };
+
+       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>;
+               };
+       };
 };
 
-- 
2.20.1

Reply via email to