[PATCH 2/2] powerpc: wii.dts: Add GPIO keys

From: Jonathan NeuschÃfer
Date: Sat Jan 12 2019 - 11:22:23 EST


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@xxxxxxx>
---
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