On Thursday 09 October 2008, Steven A. Falco wrote: > This patch adds support for the GPIO functions of PPC40x and PPC44x > SOCs.
Thanks. Tested successfully on 405EP board. I only have one comment below left. > Signed-off-by: Steve Falco <sfalco at harris.com> > --- > > I looked more closely at the datasheet. Stefan is correct that the > shadow registers are not needed for these processors, because they have > separate registers for input and output. > > I've incorporated the other changes, with one exception. I want > ppc4xx_gpio_get() to return 0 or 1 (rather than Anton's comment that any > non-zero value is ok), because when you use the new "export feature" in > sysfs, you see the raw value returned from ppc4xx_gpio_get(). So, without > the !! in the return statement, you would see a strange value, like 32768 > instead of 1: > > # cd gpio208 > # cat value > 32768 > > So, I think it is worth sanitizing the return value here. <snip> > +static int __init ppc4xx_add_gpiochips(void) > +{ > + struct device_node *np; > + > + for_each_compatible_node(np, NULL, "amcc,ppc4xx-gpio") { Since the GPIO IP-core implementation is from IBM and not AMCC I suggest to use a different compatible property: for_each_compatible_node(np, NULL, "ibm,ppc4xx-gpio") { Other than this: Acked-by: Stefan Roese <[EMAIL PROTECTED]> Best regards, Stefan _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev