On Monday 26 February 2007 5:35 am, Milan Svoboda wrote:
> This patch lets the pxa2xx_udc to use the generic gpio layer.
> Apply it on top of [patch 2.6.21-rc1] pxa2xx_udc: cleanups, use 
> platform_get_irq.

And after the patch to make ixp4xx provide generic gpio support,
unless temporary compile time (vs run time) breakage is no issue.

Please change the printk(KERN_ERR ...) when gpio_request() fails,
making it pr_debug(...) instead.  No point in bloating production
drivers with strings like that. 


> There is one problem, thought. Original code used:
> 
> static inline void udc_gpio_init_pullup(unsigned gpio)
> {
>        pxa_gpio_mode((gpio & GPIO_MD_MASK_NR) | GPIO_OUT | GPIO_DFLT_LOW);
> }
> 
> But new generic gpio doesn't allows us to specify GPIO_DFLT_LOW. I'm not 
> sure if this is a problem. Any thoughts?

Specifically here, not a problem -- since the pullup is forced low
shortly after that call.  The worst that would happen is that a
host sees a brief glitch on the D+ line, which would end up being
ignored (since that can happen anyway during enumeration).

In general, that's a potential problem.  Not including a default
value for gpio_direction_output() was an oversight, and that should
probably get fixed before 2.6.21-final.  Andrew Victor raised that
issue offline in the context of AT91 (and AVR32).

If you felt like fixing that for the ixp4xx and pxa, I expect that
fixes could soon be forthcoming for other platforms and the docs.

- Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to