From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
To: "Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>
Cc: David Brownell <david-b@pacbell.net>, linux-kernel@vger.kernel.org
Subject: Re: gpio patches in mmotm
Date: Tue, 18 Mar 2008 17:31:16 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0803181717240.5022@axis700.grange> (raw)
In-Reply-To: <20080318160316.GA31588@digi.com>
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
next parent reply other threads:[~2008-03-19 21:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080317173134.GA27282@digi.com>
[not found] ` <Pine.LNX.4.64.0803171915020.8640@axis700.grange>
[not found] ` <20080318160316.GA31588@digi.com>
2008-03-18 16:31 ` Guennadi Liakhovetski [this message]
2008-04-08 6:02 ` Uwe Kleine-König
2008-04-08 6:28 ` Guennadi Liakhovetski
2008-04-08 9:33 ` Uwe Kleine-König
2008-04-08 10:44 ` Guennadi Liakhovetski
2008-04-09 6:35 ` Uwe Kleine-König
2008-04-09 19:35 ` Guennadi Liakhovetski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0803181717240.5022@axis700.grange \
--to=g.liakhovetski@pengutronix.de \
--cc=Uwe.Kleine-Koenig@digi.com \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®