From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [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@atmel.com>
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 at vger.kernel.org
> >> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> >> ---
> >>
> >> 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
next prev parent reply other threads:[~2014-12-09 8:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 11:29 [PATCH 0/5] media: ov2640: add device tree support Josh Wu
2014-12-08 11:29 ` [PATCH 1/5] media: soc-camera: use icd->control instead of icd->pdev for reset() Josh Wu
2014-12-08 11:29 ` [PATCH 2/5] media: ov2640: add async probe function Josh Wu
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
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@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.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).