[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0803181717240.5022@axis700.grange>
Date: Tue, 18 Mar 2008 17:31:16 +0100 (CET)
From: Guennadi Liakhovetski <g.liakhovetski@...gutronix.de>
To: Uwe Kleine-König <Uwe.Kleine-Koenig@...i.com>
cc: David Brownell <david-b@...bell.net>, linux-kernel@...r.kernel.org
Subject: Re: 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
http://git.kernel.org/?p=linux/kernel/git/mchehab/v4l-dvb.git;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
functional.
Thanks
Guennadi
---
Guennadi Liakhovetski
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists