[PATCH] gpio/generic: initialize the shadow of direction register

Lothar Waßmann LW at KARO-electronics.de
Wed May 16 09:54:37 EDT 2012


Hi,

Shawn Guo writes:
> On 16 May 2012 15:34, Lothar Waßmann <LW at karo-electronics.de> wrote:
> > You initialize a variable to a specific value that defaulted to zero
> > before.
> >
> The variable defaulted to zero is causing a problem.  I'm fixing that problem.
> 
Actually I had sent a similar patch in July last year which was
rejected with the following reasoning:

| I don't know if this is a valid thing to do or not. Not every GPIO
| controller supports reading back the initial state from the direction
| register. I suspect it is better to leave initialization of the
| direction to the gpio controller driver itself.

See: http://lkml.indiana.edu/hypermail/linux/kernel/1107.0/00908.html

That's why I came up with the patch to gpio-mxc.c


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________



More information about the linux-arm-kernel mailing list