[U-Boot] [PATCH v2] M28: Added pin name support in GPIO driver

Marek Vasut marek.vasut at gmail.com
Wed Nov 23 22:00:42 CET 2011


> >> +
> >> +	if (name[0])
> >> +		return (-EINVAL);
> > 
> > Why the parenthesis ?
> 
> Because you asked for them… But OK, I'll remove them again...

I asked you to add braces around the else part of the branch!
if { ... } else { ... } ... this stuff. Sorry for the confusion!

> 
> >> +
> >> +	return ( ((bank << MXS_PAD_BANK_SHIFT) & MXS_PAD_BANK_MASK) |
> >> +		 ((pin  << MXS_PAD_PIN_SHIFT ) & MXS_PAD_PIN_MASK ) );
> >> +}
> >> +
> >> int gpio_invalid(int gp)
> >> {
> >> 
> >> 	if ( (gp & ~(MXS_PAD_BANK_MASK | MXS_PAD_PIN_MASK)) ||
> > 
> > This was there before or are we missing some previous commit here ?
> 
> To apply cleanly, this patch needs the pin validity patch applied first.
> However, it will apply without it, yet not cleanly.

I think I didn't see the pin validity patch then.


More information about the U-Boot mailing list