On Monday 26 February 2007 5:35 am, Milan Svoboda wrote:

> > 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.
> 

How to fix it?

1. Use default value, e.g. line after gpio_direction_output shall be
   always low?

Or

2. Change the gpio_direction_output(int gpio) to
   gpio_direction_output(int gpio, int level) and let the user to decide
   if he want's low or high level?

What's preferable?

Milan



-------------------------------------------------------------------------
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