On Thursday 31 January 2008, Guennadi Liakhovetski wrote:
> On Thu, 31 Jan 2008, David Brownell wrote:
> 
> > > > > > +#ifndef NO_GPIO
> > > > > > +#define NO_GPIO                        ((unsigned int)-1)
> > > > > > +#endif
> > > > > > +
> > > > > 
> > > > > I don't understand this.
> > > > 
> > > > Me either; *ANY* negative number is invalid as a GPIO number,
> > > > not just "-1"...
> > > 
> > > Ok, this one should rather go into a separate patch. I'd like to have 
> > > such 
> > > a macro to check whether the platform is using a GPIO with this specific 
> > > camera or not. Similar to NO_IRQ.
> > 
> > Then maybe there should be an is_valid_gpio() predicate.
> > Anything not between 0..MAX_INT would fail.  And there
> > should be a Documentation/gpio.txt update to match.
> 
> hm, but if you deliberately want an invalid gpio number?

Any negative number suffices -- like "-EINVAL".  But that's a
separate problem from the one you said you wanted to solve...

- Dave

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

Reply via email to