On Friday 30 June 2006 12:07 am, Lothar Wassmann wrote:
> Hi,
>
> > + if (mach->gpio_pullup)
> > + pxa_gpio_set(mach->gpio_pullup, 0);
> [...]
> > + if (mach->gpio_pullup)
> > + pxa_gpio_set(mach->gpio_pullup, 1);
> >
> What if a hardware designer chooses to use GPIO '0' for one of these
> functions?
It's explained earlier in the patch:
> --- g26.orig/include/asm-arm/arch-pxa/udc.h 2005-08-11 20:49:13.000000000
> -0700
> +++ g26/include/asm-arm/arch-pxa/udc.h 2006-06-29 11:09:17.000000000 -0700
> @@ -12,6 +12,14 @@ struct pxa2xx_udc_mach_info {
> void (*udc_command)(int cmd);
> #define PXA2XX_UDC_CMD_CONNECT 0 /* let host see us */
> #define PXA2XX_UDC_CMD_DISCONNECT 1 /* so host won't see
> us */
> +
> + /* Boards following the design guidelines in the developer's manual,
> + * with on-chip GPIOs not Lubbock's wierd hardware, can have a sane
> + * VBUS IRQ and omit the methods above. Store the GPIO number
> + * here; for GPIO 0, also mask in one of the pxa_gpio_mode() bits.
> + */
> + u16 gpio_vbus; /* high == vbus present */
> + u16 gpio_pullup; /* high == pullup activated */
> };
>
>
... that is, the GPIO_bit(x) in that gpio_set() call will
morph (0|bits) into 0 so the test succeeds.
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel