[lkml]   [2008]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: gpio patches in mmotm
Please, do not trim the CC: list. I've also added lkml.

On Tue, 18 Mar 2008, Uwe Kleine-KЖnig wrote:

> Guennadi Liakhovetski wrote:
> > On Mon, 17 Mar 2008, Uwe Kleine-KЖnig wrote:
> >
> > > I'm nure sure if I like gpio_is_valid(). When do you think it should be
> > > used? (i.e. in which situations gpio_request doesn't do the right
> > > thing?)
> >
> > For example, in situations similar to what I have in mt9m001 and mt9v022
> > camera drivers. Those cameras can be built with an i2c gpio extender,
> > which can be used to switch between 8 and 10 bit data bus widths. But that
> > extender is not always available. So, those drivers request a gpio, and if
> > it is not available on the system, the gpio_is_valid() test fails.
> I found your patch, but no tree where it applies. Can you point me to a
> tree where it applies?

These drivers are currently in the v4l-dvb tree;a=summary in
the devel branch.

> Why isn't it enough that gpio_request fails in such a situation?

I'm storing the GPIO number locally, and if the system doesn't have a
valid GPIO for me, I'm storing an invalid GPIO number. Then at any time if
the GPIO has to be used, I just verify if gpio_is_valid(), and if not,
return an error code for this request, but the driver remains otherwise

Guennadi Liakhovetski
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2008-03-19 22:11    [W:0.058 / U:1.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site