On Wednesday 28 February 2007 6:36 am, Milan Svoboda wrote:
> 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 ...
> >
> > 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?
>
> ...
> 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?
Only #2 can ensure there's never a glitch. The boot firmware may
have set up a particular after-reset value; the GPIO controller may
reset to low or high depending on its implementation (likely high
via internal pullup, and configured as input, for power savings);
so another argument is needed.
- 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
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel