Web lists-archives.org

Re: [i2c] [RFC PATCH 3/8] Add PCA9536 4 bit I2C GPIO extender support to the pca9539 GPIO driver




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?

Thanks
Guennadi
---
Guennadi Liakhovetski

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list