From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: Josh Wu <josh.wu-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
Cc: linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
m.chehab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
g.liakhovetski-Mmb7MZpHnFY@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/5] media: ov2640: add primary dt support
Date: Tue, 09 Dec 2014 10:07:47 +0200 [thread overview]
Message-ID: <4259882.xUnFntZnaF@avalon> (raw)
In-Reply-To: <54866809.7020402-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
Hi Josh,
On Tuesday 09 December 2014 11:10:01 Josh Wu wrote:
> On 12/9/2014 2:39 AM, Laurent Pinchart wrote:
> > Hi Josh,
> >
> > Thank you for the patch.
> >
> > On Monday 08 December 2014 19:29:05 Josh Wu wrote:
> >> Add device tree support for ov2640.
> >>
> >> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> Signed-off-by: Josh Wu <josh.wu-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
> >> ---
> >>
> >> v1 -> v2:
> >> 1. use gpiod APIs.
> >> 2. change the gpio pin's name according to datasheet.
> >> 3. reduce the delay for .reset() function.
> >>
> >> drivers/media/i2c/soc_camera/ov2640.c | 86 +++++++++++++++++++++++++---
> >> 1 file changed, 80 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/media/i2c/soc_camera/ov2640.c
> >> b/drivers/media/i2c/soc_camera/ov2640.c index 9ee910d..2a57979 100644
> >> --- a/drivers/media/i2c/soc_camera/ov2640.c
> >> +++ b/drivers/media/i2c/soc_camera/ov2640.c
[snip]
> >> +static int ov2640_probe_dt(struct i2c_client *client,
> >> + struct ov2640_priv *priv)
> >> +{
> >> + priv->resetb_gpio = devm_gpiod_get_optional(&client->dev, "resetb",
> >> + GPIOD_OUT_HIGH);
> >> + if (!priv->resetb_gpio)
> >> + dev_warn(&client->dev, "resetb gpio not found!\n");
> >
> > No need to warn here, it's perfectly fine if the reset signal isn't
> > connected to a GPIO.
>
> I want to print some information if no GPIO is assigned. So I'd like use
> dev_dbg() here.
> What do you feel?
If you want to print a message in that case dev_dbg is the most appropriate
log level. I would skip it completely, but that's up to you.
> >> + else if (IS_ERR(priv->resetb_gpio))
> >> + return -EINVAL;
> >> +
> >> + priv->pwdn_gpio = devm_gpiod_get_optional(&client->dev, "pwdn",
> >> + GPIOD_OUT_HIGH);
> >> + if (!priv->pwdn_gpio)
> >> + dev_warn(&client->dev, "pwdn gpio not found!\n");
> >
> > Same here.
>
> ditto.
>
> >> + else if (IS_ERR(priv->pwdn_gpio))
> >> + return -EINVAL;
> >> +
> >> + /* Initialize the soc_camera_subdev_desc */
> >> + priv->ssdd_dt.power = ov2640_hw_power;
> >> + priv->ssdd_dt.reset = ov2640_hw_reset;
> >> + client->dev.platform_data = &priv->ssdd_dt;
> >> +
> >> + return 0;
> >> +}
> >> +
> >> /*
> >> * i2c_driver functions
> >> */
--
Regards,
Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-12-09 8:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1418038147-13221-1-git-send-email-josh.wu@atmel.com>
2014-12-08 11:29 ` [PATCH 3/5] media: ov2640: add primary dt support Josh Wu
2014-12-08 18:39 ` Laurent Pinchart
2014-12-09 3:10 ` Josh Wu
[not found] ` <54866809.7020402-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2014-12-09 8:07 ` Laurent Pinchart [this message]
2014-12-08 11:29 ` [PATCH 4/5] media: ov2640: add a master clock for sensor Josh Wu
2014-12-08 15:10 ` Fabio Estevam
2014-12-09 3:03 ` Josh Wu
2014-12-08 11:29 ` [PATCH 5/5] media: ov2640: dt: add the device tree binding document Josh Wu
2014-12-08 18:59 ` Laurent Pinchart
2014-12-09 3:19 ` Josh Wu
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=4259882.xUnFntZnaF@avalon \
--to=laurent.pinchart-rylnwiuwjnjg/c1bvhzhaw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=g.liakhovetski-Mmb7MZpHnFY@public.gmane.org \
--cc=josh.wu-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=m.chehab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).