From: Sakari Ailus <sakari.ailus@iki.fi>
To: Robert Foss <robert.foss@linaro.org>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
mchehab@kernel.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, Tomasz Figa <tfiga@chromium.org>,
ben.kao@intel.com, robh+dt@kernel.org,
linux-mediatek@lists.infradead.org,
Dongchun Zhu <dongchun.zhu@mediatek.com>,
Jonathan.Cameron@huawei.com, matthias.bgg@gmail.com,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
davem@davemloft.net, linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org
Subject: Re: [v1 2/3] media: ov8856: Add devicetree support
Date: Wed, 11 Mar 2020 13:48:48 +0200 [thread overview]
Message-ID: <20200311114848.GJ2619@valkosipuli.retiisi.org.uk> (raw)
In-Reply-To: <CAG3jFyu5S1H=r6pV92tc_a2LoCUnhb0mDbOegP2BCO8a5C1nVg@mail.gmail.com>
Hi Robert,
On Tue, Mar 10, 2020 at 04:55:20PM +0100, Robert Foss wrote:
> Hi Andy,
>
> On Tue, 10 Mar 2020 at 15:26, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Tue, Mar 10, 2020 at 02:46:02PM +0100, Robert Foss wrote:
> > > Add devicetree match table, and enable ov8856_probe()
> > > to initialize power, clocks and reset pins.
> >
> > ...
> >
> > > +#define OV8856_NUM_SUPPLIES ARRAY_SIZE(ov8856_supply_names)
> >
> > Use ARRAY_SIZE() directly.
>
> Ack.
>
> >
> > Have you seen Sakari's comments?
> > Sakari, do I have déją vu or you indeed commented this driver?
>
> Yes, I may have missed some part of it, so please tell me if I have.
>
> There is a patchset floating around that implements a larger chunk of
> functionality,
> including a couple of new modes. This is based on that series.
Please see earlier comments given against an earlier variant of this set.
They're on LMML.
>
> >
> > ...
> >
> > > + gpiod_set_value_cansleep(ov8856->n_shutdn_gpio, GPIOD_OUT_LOW);
> >
> > > + gpiod_set_value_cansleep(ov8856->n_shutdn_gpio, GPIOD_OUT_HIGH);
> >
> > Yes, seems this one is inverted.
> >
> > ...
> >
> > > +{
> > > + gpiod_set_value_cansleep(ov8856->n_shutdn_gpio, GPIOD_OUT_LOW);
> > > + regulator_bulk_disable(OV8856_NUM_SUPPLIES, ov8856->supplies);
> > > + clk_disable_unprepare(ov8856->xvclk);
> > > +}
> > > +
> > > +
> >
> > One blank line is enough.
> >
> > ...
> >
> > > + ov8856->xvclk = devm_clk_get(&client->dev, "xvclk");
> > > + if (IS_ERR(ov8856->xvclk)) {
> > > + dev_err(&client->dev, "failed to get xvclk\n");
> > > + return -EINVAL;
> > > + }
> >
> > Previously it worked without clock provider, now you make a dependency.
> >
> > This won't work.
>
> So the ideal behavior would be to only use the xclk if it is provided?
See e.g. the smiapp driver on how to do this so it continues to work on
ACPI.
I think it'd be also appropriate to add the usleep() after lifting reset
only if the reset GPIO is defined for the device.
Also do consider dropping some people from the distribution. For many this
is just noise.
--
Kind regards,
Sakari Ailus
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2020-03-11 11:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 13:46 [v1 0/3] media: ov8856: Add sensor modes & devicetree support Robert Foss
2020-03-10 13:46 ` [v1 1/3] media: dt-bindings: ov8856: Document YAML bindings Robert Foss
2020-03-10 13:57 ` Fabio Estevam
2020-03-10 15:51 ` Robert Foss
2020-03-12 10:13 ` Robert Foss
2020-03-10 18:38 ` Rob Herring
2020-03-10 13:46 ` [v1 2/3] media: ov8856: Add devicetree support Robert Foss
2020-03-10 14:03 ` Fabio Estevam
2020-03-10 15:46 ` Robert Foss
2020-03-10 14:26 ` Andy Shevchenko
2020-03-10 15:55 ` Robert Foss
2020-03-11 9:05 ` Andy Shevchenko
2020-03-11 11:48 ` Sakari Ailus [this message]
2020-03-11 13:32 ` Robert Foss
2020-03-10 13:46 ` [v1 3/3] media: ov8856: Implement sensor module revision identification Robert Foss
2020-03-10 14:30 ` Andy Shevchenko
2020-03-12 16:37 ` Robert Foss
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=20200311114848.GJ2619@valkosipuli.retiisi.org.uk \
--to=sakari.ailus@iki.fi \
--cc=Jonathan.Cameron@huawei.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ben.kao@intel.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dongchun.zhu@mediatek.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=robert.foss@linaro.org \
--cc=robh+dt@kernel.org \
--cc=tfiga@chromium.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