Re: [PATCH 06/12] gpio: Add Aspeed driver
From: Andrew Jeffery
Date: Thu Jul 21 2016 - 20:49:57 EST
On Thu, 2016-07-21 at 16:12 -0400, Paul Gortmaker wrote:
> On Wed, Jul 20, 2016 at 1:58 AM, Andrew Jeffery <andrew@xxxxxxxx> wrote:
> >
> > From: Joel Stanley <joel@xxxxxxxxx>
> >
> > The Aspeed SoCs contain GPIOs grouped by letter, where each letter group
> > contains 8 pins. The GPIO letter groups are then banked in sets of four
> > in the register layout.
> >
> > The implementation exposes multiple banks through the one driver, and
> > requests and releases pins via the pinctrl subsystem. The hardware
> > supports generation of interrupts with per-pin triggers, and exposes this
> > capability through an irqchip and devicetree.
> >
> > A number of supported features are not yet implemented: Configuration of
> > interrupt direction (ARM or LPC), debouncing, and provides WDT reset
> > tolerance for output ports.
> >
> > Signed-off-by: Joel Stanley <joel@xxxxxxxxx>
> > Signed-off-by: Alistair Popple <alistair@xxxxxxxxxxxx>
> > Signed-off-by: Jeremy Kerr <jk@xxxxxxxxxx>
> > Signed-off-by: Andrew Jeffery <andrew@xxxxxxxx>
> > ---
> > Âarch/arm/mach-aspeed/Kconfig |ÂÂÂ4 +
> > Âdrivers/gpio/KconfigÂÂÂÂÂÂÂÂÂ|ÂÂÂ8 +-
> > Âdrivers/gpio/MakefileÂÂÂÂÂÂÂÂ|ÂÂÂ1 +
> > Âdrivers/gpio/gpio-aspeed.cÂÂÂ| 456 +++++++++++++++++++++++++++++++++++++++++++
> > Â4 files changed, 468 insertions(+), 1 deletion(-)
> > Âcreate mode 100644 drivers/gpio/gpio-aspeed.c
> >
> > diff --git a/arch/arm/mach-aspeed/Kconfig b/arch/arm/mach-aspeed/Kconfig
> > index 25a0ae01429e..a52de9d3adfb 100644
> > --- a/arch/arm/mach-aspeed/Kconfig
> > +++ b/arch/arm/mach-aspeed/Kconfig
> > @@ -6,6 +6,10 @@ menuconfig ARCH_ASPEED
> > ÂÂÂÂÂÂÂÂselect ASPEED_WATCHDOG
> > ÂÂÂÂÂÂÂÂselect MOXART_TIMER
> > ÂÂÂÂÂÂÂÂselect PINCTRL
> > +ÂÂÂÂÂÂÂselect GPIOLIB
> > +ÂÂÂÂÂÂÂselect GPIO_ASPEED
> > +ÂÂÂÂÂÂÂselect GPIO_SYSFS
> > +
> > ÂÂÂÂÂÂÂÂhelp
> > ÂÂÂÂÂÂÂÂÂÂSay Y here if you want to run your kernel on an ASpeed BMC SoC.
> >
> > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> > index 536112fd2466..2c21b5db09cd 100644
> > --- a/drivers/gpio/Kconfig
> > +++ b/drivers/gpio/Kconfig
> > @@ -137,6 +137,13 @@ config GPIO_ATH79
> > ÂÂÂÂÂÂÂÂÂÂSelect this option to enable GPIO driver for
> > ÂÂÂÂÂÂÂÂÂÂAtheros AR71XX/AR724X/AR913X SoC devices.
> >
> > +config GPIO_ASPEED
> > +ÂÂÂÂÂÂÂbool "Aspeed GPIO support"
> Since this is a bool Kconfig...
>
> >
> > +ÂÂÂÂÂÂÂdepends on (ARCH_ASPEED || COMPILE_TEST) && OF
> > +ÂÂÂÂÂÂÂselect GENERIC_IRQ_CHIP
> > +ÂÂÂÂÂÂÂhelp
> > +ÂÂÂÂÂÂÂÂÂSay Y here to support Aspeed AST2400 and AST2500 GPIO controllers.
> > +
> [...]
>
> Â> diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
> >
> > new file mode 100644
> > index 000000000000..7885adc1332a
> > --- /dev/null
> > +++ b/drivers/gpio/gpio-aspeed.c
> > @@ -0,0 +1,456 @@
> > +/*
> > + * Copyright 2015 IBM Corp
> > + *
> > + * Joel Stanley <joel@xxxxxxxxx>
> > + *
> > + * This program is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU General Public License
> > + * as published by the Free Software Foundation; either version
> > + * 2 of the License, or (at your option) any later version.
> > + */
> > +
> > +#include
> ...can you please get rid of module.h and all the MODULE_
> stuff and use the built in registration?ÂÂÂAlternatively change it to
> a tristate if there is a valid use case for it to be modular.
>
I'll change it to tristate; I don't see a reason to require it be built
in.
Cheers,
AndrewAttachment:
signature.asc
Description: This is a digitally signed message part