Re: PIXIS gpio controller and gpio flags

2008-07-23 Thread Trent Piepho
On Wed, 23 Jul 2008, Anton Vorontsov wrote: > On Mon, Jul 21, 2008 at 02:12:20PM -0700, Trent Piepho wrote: >> On Mon, 21 Jul 2008, Anton Vorontsov wrote: >>> On Sat, Jul 19, 2008 at 02:08:01PM -0700, Trent Piepho wrote: It doesn't look like you have any way to unset the active low flag. What

Re: PIXIS gpio controller and gpio flags

2008-07-23 Thread Anton Vorontsov
On Mon, Jul 21, 2008 at 02:12:20PM -0700, Trent Piepho wrote: > On Mon, 21 Jul 2008, Anton Vorontsov wrote: > > On Sat, Jul 19, 2008 at 02:08:01PM -0700, Trent Piepho wrote: > >> It doesn't look like you have any way to unset the active low flag. What > >> if > >> I unload the leds-gpio driver (o

Re: PIXIS gpio controller and gpio flags

2008-07-21 Thread Trent Piepho
On Mon, 21 Jul 2008, Anton Vorontsov wrote: > On Sat, Jul 19, 2008 at 02:08:01PM -0700, Trent Piepho wrote: >> It doesn't look like you have any way to unset the active low flag. What if >> I unload the leds-gpio driver (or another gpio user) and then try to use the >> gpio with something else? T

Re: PIXIS gpio controller and gpio flags

2008-07-21 Thread Anton Vorontsov
On Sat, Jul 19, 2008 at 02:08:01PM -0700, Trent Piepho wrote: > On Fri, 18 Jul 2008, Anton Vorontsov wrote: > > +int px_gpio_xlate(struct of_gpio_chip *of_gc, struct device_node *np, > > + const void *gpio_spec) > > +{ > > + if (gpio[1] & PX_GPIO_FLAG_ACTIVE_LOW) > > +

Re: PIXIS gpio controller and gpio flags

2008-07-19 Thread Trent Piepho
On Fri, 18 Jul 2008, Anton Vorontsov wrote: > +int px_gpio_xlate(struct of_gpio_chip *of_gc, struct device_node *np, > + const void *gpio_spec) > +{ > + if (gpio[1] & PX_GPIO_FLAG_ACTIVE_LOW) > + px_gc->active_low |= pin2mask(*gpio); You have a race here. What if px_