linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-media <linux-media@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	LAK <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v5 2/5] media: i2c: ov5645: Drop reading clock-frequency dt-property
Date: Tue, 7 Apr 2020 08:36:19 +0100	[thread overview]
Message-ID: <CA+V-a8tmj0SDpJWPL1B3GQ6FA=fLN-4-oCj5p4L0vAZSBg29vw@mail.gmail.com> (raw)
In-Reply-To: <20200406173425.GE16885@pendragon.ideasonboard.com>

Hi Laurent,

Thank you for the review.

On Mon, Apr 6, 2020 at 6:34 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Prabhakar,
>
> Thank you for the patch.
>
> On Mon, Apr 06, 2020 at 05:42:38PM +0100, Lad Prabhakar wrote:
> > Modes in the driver are based on xvclk frequency fixed to 24MHz, but where
> > as the OV5645 sensor can support the xvclk frequency ranging from 6MHz to
> > 24MHz. So instead making clock-frequency as dt-property just let the
> > driver enforce the required clock frequency.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> >  drivers/media/i2c/ov5645.c | 14 +++++---------
> >  1 file changed, 5 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
> > index a6c17d15d754..52848fff8a08 100644
> > --- a/drivers/media/i2c/ov5645.c
> > +++ b/drivers/media/i2c/ov5645.c
> > @@ -61,6 +61,8 @@
> >  #define OV5645_SDE_SAT_U             0x5583
> >  #define OV5645_SDE_SAT_V             0x5584
> >
> > +#define OV5645_XVCLK_FREQ            24000000
> > +
> >  /* regulator supplies */
> >  static const char * const ov5645_supply_name[] = {
> >       "vdddo", /* Digital I/O (1.8V) supply */
> > @@ -1094,25 +1096,19 @@ static int ov5645_probe(struct i2c_client *client)
> >               return PTR_ERR(ov5645->xclk);
> >       }
> >
> > -     ret = of_property_read_u32(dev->of_node, "clock-frequency", &xclk_freq);
> > +     ret = clk_set_rate(ov5645->xclk, OV5645_XVCLK_FREQ);
> >       if (ret) {
> > -             dev_err(dev, "could not get xclk frequency\n");
> > +             dev_err(dev, "could not set xclk frequency\n");
> >               return ret;
> >       }
> > -
>
> I think you can keep the blank line here.
>
Oops my bad will drop that in next version.

Cheers,
--Prabhakar

> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> >       /* external clock must be 24MHz, allow 1% tolerance */
> > +     xclk_freq = clk_get_rate(ov5645->xclk);
> >       if (xclk_freq < 23760000 || xclk_freq > 24240000) {
> >               dev_err(dev, "external clock frequency %u is not supported\n",
> >                       xclk_freq);
> >               return -EINVAL;
> >       }
> >
> > -     ret = clk_set_rate(ov5645->xclk, xclk_freq);
> > -     if (ret) {
> > -             dev_err(dev, "could not set xclk frequency\n");
> > -             return ret;
> > -     }
> > -
> >       for (i = 0; i < OV5645_NUM_SUPPLIES; i++)
> >               ov5645->supplies[i].supply = ov5645_supply_name[i];
> >
>
> --
> Regards,
>
> Laurent Pinchart

  reply	other threads:[~2020-04-07  7:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 16:42 [PATCH v5 0/5] ov5645: Deprecate usage of the clock-frequency Lad Prabhakar
2020-04-06 16:42 ` [PATCH v5 1/5] media: dt-bindings: media: i2c: Deprecate usage of the clock-frequency property Lad Prabhakar
2020-04-06 17:30   ` Laurent Pinchart
2020-04-07  7:35     ` Lad, Prabhakar
2020-04-07  7:14   ` Geert Uytterhoeven
2020-04-14 13:55   ` Rob Herring
2020-04-06 16:42 ` [PATCH v5 2/5] media: i2c: ov5645: Drop reading clock-frequency dt-property Lad Prabhakar
2020-04-06 16:51   ` Sakari Ailus
2020-04-06 17:11     ` Lad, Prabhakar
2020-04-06 17:32     ` Laurent Pinchart
2020-04-07  6:22       ` Sakari Ailus
2020-04-07 12:21         ` Laurent Pinchart
2020-04-07 15:14           ` Sakari Ailus
2020-04-14 20:55             ` Laurent Pinchart
2020-04-14 20:56               ` Laurent Pinchart
2020-04-15  8:19               ` Maxime Ripard
2020-04-15 16:27               ` Sakari Ailus
2020-04-17  2:09                 ` Laurent Pinchart
2020-04-06 17:34   ` Laurent Pinchart
2020-04-07  7:36     ` Lad, Prabhakar [this message]
2020-04-07  7:16   ` Geert Uytterhoeven
2020-04-07  7:40     ` Lad, Prabhakar
2020-04-07 12:18       ` Laurent Pinchart
2020-04-06 16:42 ` [PATCH v5 3/5] media: i2c: ov5645: Turn probe error into warning for xvclk frequency mismatch Lad Prabhakar
2020-04-06 17:35   ` Laurent Pinchart
2020-04-07  7:19   ` Geert Uytterhoeven
2020-04-07  7:43     ` Lad, Prabhakar
2020-04-06 16:42 ` [PATCH v5 4/5] ARM: dts: imx6qdl-wandboard: Drop clock-frequency property from ov5645 node Lad Prabhakar
2020-04-06 17:36   ` Laurent Pinchart
2020-04-06 16:42 ` [PATCH v5 5/5] media: dt-bindings: media: i2c: convert ov5645 bindings to json-schema Lad Prabhakar
2020-04-06 17:43   ` Laurent Pinchart
2020-04-07  7:46     ` Lad, Prabhakar
2020-04-15 14:43     ` Rob Herring

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='CA+V-a8tmj0SDpJWPL1B3GQ6FA=fLN-4-oCj5p4L0vAZSBg29vw@mail.gmail.com' \
    --to=prabhakar.csengg@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=kernel@pengutronix.de \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mchehab@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shawnguo@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;
as well as URLs for NNTP newsgroup(s).