On Thu 2010-02-11 14:35:14, Bill Gatliff wrote:
> Pavel Machek wrote:
> >> +static void
> >> +gpio_pwm_work (struct work_struct *work)
> >> +{
> >> +  struct gpio_pwm *gp = container_of(work, struct gpio_pwm, work);
> >> +
> >> +  if (gp->active)
> >> +          gpio_direction_output(gp->gpio, gp->polarity ? 1 : 0);
> >> +  else
> >> +          gpio_direction_output(gp->gpio, gp->polarity ? 0 : 1);
> >> +}
> >>     
> >
> > ...polarity ^ active ?
> >   
> 
> ... except that if polarity and/or active are >1, I don't send the
> values 1 or 0 to gpio_direction_output.  I don't know if the API is
> specifically intended to accept nonzero values that are greater than 1.

!polarity ^ !active ? :-).
                                                                        Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to