lkml.org 
[lkml]   [2018]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/4] gpio: Add GPIO driver for Nintendo Wii
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@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@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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-02-09 17:59    [W:0.098 / U:2.292 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site