2019-01-12 17:10:02

by J. Neuschäfer

[permalink] [raw]
Subject: [PATCH 0/2] powerpc: wii.dts: GPIO interrupt and button support

This patchset adds the necessary bits to wii.dts to enable interrupt
support in the GPIO controller, and defines two GPIO-based buttons,
the POWER button and the EJECT button.

I will send another patchset which will implement interrupt support in
the GPIO driver (gpio-hlwd.c).

Jonathan Neuschäfer (2):
powerpc: wii.dts: Add interrupt-related properties to GPIO node
powerpc: wii.dts: Add GPIO keys

arch/powerpc/boot/dts/wii.dts | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

--
2.20.1



2019-01-12 17:10:02

by J. Neuschäfer

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

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 <[email protected]>
---
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


2019-01-12 17:10:19

by J. Neuschäfer

[permalink] [raw]
Subject: [PATCH 1/2] powerpc: wii.dts: Add interrupt-related properties to GPIO node

The Hollywood GPIO controller is connected to the Hollywood PIC (&PIC1)
at IRQs 10 and 11; IRQ 10 for GPIO lines that are configured for access
by the PPC, 11 for GPIO lines that are configured for access by the
ARM926.

Signed-off-by: Jonathan Neuschäfer <[email protected]>
---
arch/powerpc/boot/dts/wii.dts | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts
index 40fe791ec9e6..864e5a17aa1d 100644
--- a/arch/powerpc/boot/dts/wii.dts
+++ b/arch/powerpc/boot/dts/wii.dts
@@ -187,6 +187,11 @@
"DEBUG0", "DEBUG1", "DEBUG2", "DEBUG3",
"DEBUG4", "DEBUG5", "DEBUG6", "DEBUG7";

+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <10>;
+ interrupt-parent = <&PIC1>;
+
/*
* This is commented out while a standard binding
* for i2c over gpio is defined.
--
2.20.1


2019-01-24 03:41:08

by Michael Ellerman

[permalink] [raw]
Subject: Re: [1/2] powerpc: wii.dts: Add interrupt-related properties to GPIO node

On Sat, 2019-01-12 at 16:21:23 UTC, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= wrote:
> The Hollywood GPIO controller is connected to the Hollywood PIC (&PIC1)
> at IRQs 10 and 11; IRQ 10 for GPIO lines that are configured for access
> by the PPC, 11 for GPIO lines that are configured for access by the
> ARM926.
>
> Signed-off-by: Jonathan Neuschäfer <[email protected]>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/8de7547e03059281fda075355c114694

cheers

2019-01-24 03:41:29

by Michael Ellerman

[permalink] [raw]
Subject: Re: [1/2] powerpc: wii.dts: Add interrupt-related properties to GPIO node

On Sat, 2019-01-12 at 16:21:23 UTC, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= wrote:
> The Hollywood GPIO controller is connected to the Hollywood PIC (&PIC1)
> at IRQs 10 and 11; IRQ 10 for GPIO lines that are configured for access
> by the PPC, 11 for GPIO lines that are configured for access by the
> ARM926.
>
> Signed-off-by: Jonathan Neuschäfer <[email protected]>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/f4ddc19a711736eb54fb8259499faf5a

cheers