[PATCH v2] powerpc: implement support for MPC8349-compatible SOC GPIOs

Anton Vorontsov avorontsov at ru.mvista.com
Thu Sep 18 21:20:20 EST 2008


On Wed, Sep 17, 2008 at 09:30:16PM +0200, Peter Korsgaard wrote:
> >>>>> "Anton" == Anton Vorontsov <avorontsov at ru.mvista.com> writes:
> 
> Hi,
> 
>  Anton> This patch implements GPIOLIB support for MPC8349-compatible SOC GPIOs.
>  Anton> MPC8610 adopted this GPIO unit, so let's place it into sysdev.
> 
>  Anton> We'll need these gpios to support IrDA transceiver on MPC8610HPCD.
> 
> It seems basically the same as my patch (gpio driver for
> mpc831x/mpc834x/mpc837x with OF bindings) from September 5th except
> you don't have any documentation

Well, do we really need documentation for every trivial gpio controller?
The bindings are the same, only different compatible entries...

If we do need the documentation for this, I can readily include it.

> and the Kconfig doesn't depend on
> 831x/834x/837x.

This is purposely. We also need support for 8610, and maybe
later we'll find another chip with the same unit. So, to not touch
the Kconfig for every new chip I just made it PPC32-wide. Other
option is to depend on FSL_SOC, but the driver really does not
depend on any fsl_soc stuff...

> Galak, did you have time to look at these patches yet?
> 
>  Anton> +struct fsl_gpio_chip {
>  Anton> +	struct of_mm_gpio_chip mm_gc;
>  Anton> +	spinlock_t lock;
>  Anton> +
>  Anton> +	/* shadowed data register to clear/set bits safely */
>  Anton> +	u32 gpdat;
> 
> Why do you need this when you have the lock?

See this discussion:

http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg12299.html

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2



More information about the Linuxppc-dev mailing list