mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: "Xingyu Wu" <wuxy@bitland.com.cn>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"shawnx.tu" <shawnx.tu@intel.com>,
	"Hans Verkuil" <hverkuil-cisco@xs4all.nl>,
	"dave.stevenson" <dave.stevenson@raspberrypi.com>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Cao Bing Bu" <bingbu.cao@intel.com>,
	"Nicolas Boichat" <drinkcat@chromium.org>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	linux-devicetree <devicetree@vger.kernel.org>,
	"Dongchun Zhu" <dongchun.zhu@mediatek.com>,
	"Sj Huang" <sj.huang@mediatek.com>,
	darfur_liu <darfur_liu@gcoreinc.com>,
	"hao.he7" <hao.he7@gmail.com>, 何浩B03205 <hao.he@bitland.com.cn>
Subject: Re: [PATCH V3 3/3] media: i2c: gc5035: Add GC5035 image sensor driver
Date: Thu, 3 Sep 2020 09:30:42 +0300	[thread overview]
Message-ID: <20200903063042.GH32646@paasikivi.fi.intel.com> (raw)
In-Reply-To: <CAAFQd5ARYNVMjScuk5-w_z5Pt6jD=CPkCYG+rM2Znvt9j1Od6g@mail.gmail.com>

Hi Tomasz,

On Thu, Sep 03, 2020 at 12:59:20AM +0200, Tomasz Figa wrote:
> Hi Sakari,
> 
> On Mon, Aug 31, 2020 at 7:41 PM Sakari Ailus
> <sakari.ailus@linux.intel.com> wrote:
> >
> > Hi Xingyu,
> >
> > Thanks for the update. I've got a few more comments below.
> >
> > Do you happen to have some insight on what the OTP data contains and what
> > does the driver do with it?
> >
> > At least in principle the OTP data may be programmed for the customer so
> > the same sensor could contain something else what the driver expects to
> > find there.
> >
> 
> Thanks for the review. For anything without my reply, assume fixed. :)
> 
> As far as I can see, the data is being read from an area that is
> supposed to be reserved for Galaxycore, so I'd assume it doesn't
> depend on the customer.

Sounds good.

> 
> [snip]
> > > diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> > > index da11036..aeaf594 100644
> > > --- a/drivers/media/i2c/Kconfig
> > > +++ b/drivers/media/i2c/Kconfig
> > > @@ -712,6 +712,18 @@ config VIDEO_APTINA_PLL
> > >  config VIDEO_SMIAPP_PLL
> > >       tristate
> > >
> > > +config VIDEO_GC5035
> > > +     tristate "Galaxycore GC5035 sensor support"
> > > +     depends on I2C && VIDEO_V4L2
> > > +     select MEDIA_CONTROLLER
> > > +     select VIDEO_V4L2_SUBDEV_API
> >
> > Add:
> >
> >         V4L2_FWNODE
> >         OF
> 
> This driver doesn't depend on OF. It uses the firmware-independent
> property access API. (v4 I sent actually uses device_property_*()).

Yes, this is even better.

> 
> [snip]
> > > +static int __gc5035_power_on(struct gc5035 *gc5035)
> > > +{
> > > +     struct device *dev = &gc5035->client->dev;
> > > +     int i, ret;
> > > +
> > > +     ret = clk_prepare_enable(gc5035->xvclk);
> > > +     if (ret < 0) {
> > > +             dev_err(dev, "Failed to enable xvclk\n");
> > > +             return ret;
> > > +     }
> > > +
> > > +     gpiod_set_value_cansleep(gc5035->reset_gpio, 1);
> > > +
> > > +     for (i = 0; i < GC5035_NUM_SUPPLIES; i++) {
> > > +             ret = regulator_enable(gc5035->supplies[i].consumer);
> > > +             if (ret) {
> > > +                     dev_err(dev, "Failed to enable %s: %d\n",
> > > +                             gc5035->supplies[i].supply, ret);
> > > +                     goto disable_reg_clk;
> >
> > Please use regulator_bulk_enable() here, and regulator_bulk_disable()
> > below.
> >
> 
> This actually needs to have one of the regulators (iovdd) enabled
> before the other ones, but regulator_bulk_enable() is async. In v4 I
> used regulator_enable() for iovdd and regulator_bulk_enable() for the
> other two for optimal sequencing.

Ack.

-- 
Sakari Ailus

  reply	other threads:[~2020-09-03  6:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1597380295-6297-1-git-send-email-wuxy@bitland.com.cn>
     [not found] ` <1597380295-6297-3-git-send-email-wuxy@bitland.com.cn>
2020-08-25  2:10   ` [PATCH V3 1/3] dt-bindings: vendor-prefixes: Add GalaxyCore Rob Herring
     [not found] ` <1597380295-6297-5-git-send-email-wuxy@bitland.com.cn>
2020-08-31 17:40   ` [PATCH V3 3/3] media: i2c: gc5035: Add GC5035 image sensor driver Sakari Ailus
2020-09-02 22:59     ` Tomasz Figa
2020-09-03  6:30       ` Sakari Ailus [this message]
2020-08-31 18:02 ` [PATCH V3] Add GalaxyCore " Sakari Ailus
     [not found]   ` <tencent_0189E021005C2124231E353A@qq.com>
2020-09-02 16:17     ` Tomasz Figa

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=20200903063042.GH32646@paasikivi.fi.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=darfur_liu@gcoreinc.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dongchun.zhu@mediatek.com \
    --cc=drinkcat@chromium.org \
    --cc=hao.he7@gmail.com \
    --cc=hao.he@bitland.com.cn \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shawnx.tu@intel.com \
    --cc=sj.huang@mediatek.com \
    --cc=tfiga@chromium.org \
    --cc=wuxy@bitland.com.cn \
    /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

all inboxes | Powered by JetHome®