From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] v4l: mt9p031: Convert to the gpiod API
Date: Wed, 11 Mar 2015 20:29:47 +0200 [thread overview]
Message-ID: <3867034.1AdnyGUIFs@avalon> (raw)
In-Reply-To: <CA+V-a8uvEfiTAsL826udM8r0aFT3ZYXkMoT1UXgCOeq=pTbw0Q@mail.gmail.com>
Hi Prabhakar,
On Tuesday 10 March 2015 18:29:22 Lad, Prabhakar wrote:
> On Sun, Mar 8, 2015 at 1:40 PM, Laurent Pinchart wrote:
> > This simplifies platform data and DT integration.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >
> > drivers/media/i2c/mt9p031.c | 31 +++++++++++--------------------
> > include/media/mt9p031.h | 2 --
> > 2 files changed, 11 insertions(+), 22 deletions(-)
> >
> > diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c
> > index 89ae2b4..1757ef6 100644
> > --- a/drivers/media/i2c/mt9p031.c
> > +++ b/drivers/media/i2c/mt9p031.c
[snip]
> > @@ -332,8 +331,8 @@ static int mt9p031_power_on(struct mt9p031 *mt9p031)
> > }
> >
> > /* Now RESET_BAR must be high */
> > - if (gpio_is_valid(mt9p031->reset)) {
> > - gpio_set_value(mt9p031->reset, 1);
> > + if (mt9p031->reset) {
> > + gpiod_set_value(mt9p031->reset, 0);
> > usleep_range(1000, 2000);
> > }
>
> As per the data sheet reset needs to be low initially and then high,
> you just reversed it.
The gpiod_ API will take the GPIO active-low flag into account, so the above
gpiod_set_value(0) call will set the GPIO level to 1.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2015-03-11 18:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-08 13:40 [PATCH] v4l: mt9p031: Convert to the gpiod API Laurent Pinchart
2015-03-10 18:29 ` Lad, Prabhakar
2015-03-11 18:29 ` Laurent Pinchart [this message]
2015-03-11 19:45 ` Lad, Prabhakar
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=3867034.1AdnyGUIFs@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
/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