[PATCH v3 2/4] gpio: Add GPIO driver for Nintendo Wii
Jonathan Neuschäfer
j.neuschaefer at gmx.net
Sat Feb 10 03:58:58 AEDT 2018
On Fri, Feb 09, 2018 at 05:30:55PM +0200, Andy Shevchenko wrote:
> On Fri, Feb 9, 2018 at 2:07 PM, Jonathan Neuschäfer
> <j.neuschaefer at gmx.net> wrote:
> > The Nintendo Wii's chipset (called "Hollywood") has a GPIO controller
> > that supports a configurable number of pins (up to 32), interrupts, and
> > some special mechanisms to share the controller between the system's
> > security processor (an ARM926) and the PowerPC CPU. Pin multiplexing is
> > not supported.
> >
> > This patch adds a basic driver for this GPIO controller. Interrupt
> > support will come in a later patch.
> >
> > This patch is based on code developed by Albert Herranz and the GameCube
> > Linux Team, file arch/powerpc/platforms/embedded6xx/hlwd-gpio.c,
> > available at https://github.com/DeltaResero/GC-Wii-Linux-Kernels, but
> > has grown quite dissimilar.
> >
>
> Fine to me, though one comment below.
> In any case,
>
> Reviewed-by: Andy Shevchenko <andy.shevchenko at gmail.com>
Thank you.
[...]
> > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> > index d6a8e851ad13..47606dfe06cc 100644
> > --- a/drivers/gpio/Kconfig
> > +++ b/drivers/gpio/Kconfig
> > @@ -229,6 +229,15 @@ config GPIO_GRGPIO
> > Select this to support Aeroflex Gaisler GRGPIO cores from the GRLIB
> > VHDL IP core library.
> >
> > +config GPIO_HLWD
> > + tristate "Nintendo Wii (Hollywood) GPIO"
>
> > + depends on OF_GPIO
>
> You may get rid of it if...
[ Even if this driver isn't switched to the unified device property API,
I think "depends on OF" would be enough here, because it doesn't use
the code that's guarded by CONFIG_OF_GPIO (gpiolib-of.c), but this
applies to other drivers (e.g. gpio-aspeed, gpio-bcm-kona) as well, so
this would ideally be a bigger cleanup patch. ]
> > + res = of_property_read_u32(pdev->dev.of_node, "ngpios", &ngpios);
>
> ...if you switch to unified device property API.
I don't think this change is worth making, unless/until the of_property
API is deprecated. I'm rather sure this GPIO controller won't appear in
an ACPI-based system.
Thanks,
Jonathan Neuschäfer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20180209/de430150/attachment.sig>
More information about the Linuxppc-dev
mailing list