All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dongchun Zhu <dongchun.zhu@mediatek.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Nicolas Boichat" <drinkcat@chromium.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Cao Bing Bu" <bingbu.cao@intel.com>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	"list@263.net:IOMMU DRIVERS <iommu@lists.linux-foundation.org>,
	Joerg  Roedel <joro@8bytes.org>,"
	<linux-arm-kernel@lists.infradead.org>,
	"Sj Huang" <sj.huang@mediatek.com>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>,
	linux-devicetree <devicetree@vger.kernel.org>,
	"Louis Kuo" <louis.kuo@mediatek.com>,
	"Shengnan Wang (王圣男)" <shengnan.wang@mediatek.com>,
	dongchun.zhu@mediatek.com
Subject: Re: [PATCH V11 2/2] media: i2c: ov02a10: Add OV02A10 image sensor driver
Date: Wed, 1 Jul 2020 15:58:44 +0800	[thread overview]
Message-ID: <1593590324.17166.30.camel@mhfsdcap03> (raw)
In-Reply-To: <CAAFQd5CwwLzGKiCPdd_EzipmXPA2aYBrk0QRPv6Bacy++tXrHA@mail.gmail.com>

On Tue, 2020-06-30 at 16:40 +0200, Tomasz Figa wrote:
> On Tue, Jun 30, 2020 at 4:37 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Tue, Jun 30, 2020 at 04:21:31PM +0200, Tomasz Figa wrote:
> > > On Tue, Jun 30, 2020 at 4:19 PM Tomasz Figa <tfiga@chromium.org> wrote:
> > > > On Tue, Jun 30, 2020 at 11:54 AM Sakari Ailus
> > > > <sakari.ailus@linux.intel.com> wrote:
> >
> > ...
> >
> > > > > > +     ov02a10->rst_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
> > > > >
> > > > >
> > > > > Shouldn't this be GPIOD_OUT_HIGH? That's the state it'll be after powering
> > > > > the sensor off the first time. Alternatively make reset signal high in
> > > > > runtime suspend callback.
> > > >
> > > > We might want to keep the signals low when the regulators are powered
> > > > down, to reduce the leakage.
> > >
> > > Ah, I actually recall that the reset pin was physically active low, so
> > > we would indeed better keep it at HIGH. Sorry for the noise.
> >
> > Here HIGH means "asserted", so in the code above it's LOW, means "deasserted",
> > i.o.w. non-reset state. I dunno what is better, it depends to the firmware /
> > driver expectations of the device configuration (from the power point of view,
> > HIGH makes sense here, and not LOW, i.o.w. asserted reset line).
> >
> > And nice of the logical state that it doesn't depend to the active low / high
> > (the latter just transparent to the user).
> 
> Yeah, after reading through the GPIO subsystem documentation and
> discussing with a bunch of people on how to interpret it, we concluded
> that the driver needs to deal only with the logical state of the
> signal.
> 
> Actually, I later realized that the problem of leakage should likely
> be solved by pinctrl suspend settings, based on given hardware
> conditions, rather than the driver explicitly.
> 

Thank you for all your explanation.
Fixed in next release.

> Best regards,
> Tomasz


WARNING: multiple messages have this Message-ID (diff)
From: Dongchun Zhu <dongchun.zhu@mediatek.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	"Nicolas Boichat" <drinkcat@chromium.org>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	linux-devicetree <devicetree@vger.kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Shengnan Wang (王圣男)" <shengnan.wang@mediatek.com>,
	"Louis Kuo" <louis.kuo@mediatek.com>,
	"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
	"Sj Huang" <sj.huang@mediatek.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	dongchun.zhu@mediatek.com,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Cao Bing Bu" <bingbu.cao@intel.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"list@263.net:IOMMU DRIVERS <iommu@lists.linux-foundation.org>,
	 Joerg  Roedel <joro@8bytes.org>,
	" <linux-arm-kernel@lists.infradead.org>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>
Subject: Re: [PATCH V11 2/2] media: i2c: ov02a10: Add OV02A10 image sensor driver
Date: Wed, 1 Jul 2020 15:58:44 +0800	[thread overview]
Message-ID: <1593590324.17166.30.camel@mhfsdcap03> (raw)
In-Reply-To: <CAAFQd5CwwLzGKiCPdd_EzipmXPA2aYBrk0QRPv6Bacy++tXrHA@mail.gmail.com>

On Tue, 2020-06-30 at 16:40 +0200, Tomasz Figa wrote:
> On Tue, Jun 30, 2020 at 4:37 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Tue, Jun 30, 2020 at 04:21:31PM +0200, Tomasz Figa wrote:
> > > On Tue, Jun 30, 2020 at 4:19 PM Tomasz Figa <tfiga@chromium.org> wrote:
> > > > On Tue, Jun 30, 2020 at 11:54 AM Sakari Ailus
> > > > <sakari.ailus@linux.intel.com> wrote:
> >
> > ...
> >
> > > > > > +     ov02a10->rst_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
> > > > >
> > > > >
> > > > > Shouldn't this be GPIOD_OUT_HIGH? That's the state it'll be after powering
> > > > > the sensor off the first time. Alternatively make reset signal high in
> > > > > runtime suspend callback.
> > > >
> > > > We might want to keep the signals low when the regulators are powered
> > > > down, to reduce the leakage.
> > >
> > > Ah, I actually recall that the reset pin was physically active low, so
> > > we would indeed better keep it at HIGH. Sorry for the noise.
> >
> > Here HIGH means "asserted", so in the code above it's LOW, means "deasserted",
> > i.o.w. non-reset state. I dunno what is better, it depends to the firmware /
> > driver expectations of the device configuration (from the power point of view,
> > HIGH makes sense here, and not LOW, i.o.w. asserted reset line).
> >
> > And nice of the logical state that it doesn't depend to the active low / high
> > (the latter just transparent to the user).
> 
> Yeah, after reading through the GPIO subsystem documentation and
> discussing with a bunch of people on how to interpret it, we concluded
> that the driver needs to deal only with the logical state of the
> signal.
> 
> Actually, I later realized that the problem of leakage should likely
> be solved by pinctrl suspend settings, based on given hardware
> conditions, rather than the driver explicitly.
> 

Thank you for all your explanation.
Fixed in next release.

> Best regards,
> Tomasz

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Dongchun Zhu <dongchun.zhu@mediatek.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	"Nicolas Boichat" <drinkcat@chromium.org>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	linux-devicetree <devicetree@vger.kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Shengnan Wang (王圣男)" <shengnan.wang@mediatek.com>,
	"Louis Kuo" <louis.kuo@mediatek.com>,
	"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
	"Sj Huang" <sj.huang@mediatek.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	dongchun.zhu@mediatek.com,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"Cao Bing Bu" <bingbu.cao@intel.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"list@263.net:IOMMU DRIVERS <iommu@lists.linux-foundation.org>,
	 Joerg  Roedel <joro@8bytes.org>,
	" <linux-arm-kernel@lists.infradead.org>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>
Subject: Re: [PATCH V11 2/2] media: i2c: ov02a10: Add OV02A10 image sensor driver
Date: Wed, 1 Jul 2020 15:58:44 +0800	[thread overview]
Message-ID: <1593590324.17166.30.camel@mhfsdcap03> (raw)
In-Reply-To: <CAAFQd5CwwLzGKiCPdd_EzipmXPA2aYBrk0QRPv6Bacy++tXrHA@mail.gmail.com>

On Tue, 2020-06-30 at 16:40 +0200, Tomasz Figa wrote:
> On Tue, Jun 30, 2020 at 4:37 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Tue, Jun 30, 2020 at 04:21:31PM +0200, Tomasz Figa wrote:
> > > On Tue, Jun 30, 2020 at 4:19 PM Tomasz Figa <tfiga@chromium.org> wrote:
> > > > On Tue, Jun 30, 2020 at 11:54 AM Sakari Ailus
> > > > <sakari.ailus@linux.intel.com> wrote:
> >
> > ...
> >
> > > > > > +     ov02a10->rst_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
> > > > >
> > > > >
> > > > > Shouldn't this be GPIOD_OUT_HIGH? That's the state it'll be after powering
> > > > > the sensor off the first time. Alternatively make reset signal high in
> > > > > runtime suspend callback.
> > > >
> > > > We might want to keep the signals low when the regulators are powered
> > > > down, to reduce the leakage.
> > >
> > > Ah, I actually recall that the reset pin was physically active low, so
> > > we would indeed better keep it at HIGH. Sorry for the noise.
> >
> > Here HIGH means "asserted", so in the code above it's LOW, means "deasserted",
> > i.o.w. non-reset state. I dunno what is better, it depends to the firmware /
> > driver expectations of the device configuration (from the power point of view,
> > HIGH makes sense here, and not LOW, i.o.w. asserted reset line).
> >
> > And nice of the logical state that it doesn't depend to the active low / high
> > (the latter just transparent to the user).
> 
> Yeah, after reading through the GPIO subsystem documentation and
> discussing with a bunch of people on how to interpret it, we concluded
> that the driver needs to deal only with the logical state of the
> signal.
> 
> Actually, I later realized that the problem of leakage should likely
> be solved by pinctrl suspend settings, based on given hardware
> conditions, rather than the driver explicitly.
> 

Thank you for all your explanation.
Fixed in next release.

> Best regards,
> Tomasz

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-07-01  7:59 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30  2:49 [PATCH V11 0/2] media: i2c: Add support for 0V02A10 sensor Dongchun Zhu
2020-06-30  2:49 ` Dongchun Zhu
2020-06-30  2:49 ` Dongchun Zhu
2020-06-30  2:49 ` [PATCH V11 1/2] media: dt-bindings: media: i2c: Document OV02A10 bindings Dongchun Zhu
2020-06-30  2:49   ` Dongchun Zhu
2020-06-30  2:49   ` Dongchun Zhu
2020-06-30 16:59   ` Tomasz Figa
2020-06-30 16:59     ` Tomasz Figa
2020-06-30 16:59     ` Tomasz Figa
2020-06-30  2:49 ` [PATCH V11 2/2] media: i2c: ov02a10: Add OV02A10 image sensor driver Dongchun Zhu
2020-06-30  2:49   ` Dongchun Zhu
2020-06-30  2:49   ` Dongchun Zhu
2020-06-30  9:54   ` Sakari Ailus
2020-06-30  9:54     ` Sakari Ailus
2020-06-30  9:54     ` Sakari Ailus
2020-06-30 14:19     ` Tomasz Figa
2020-06-30 14:19       ` Tomasz Figa
2020-06-30 14:19       ` Tomasz Figa
2020-06-30 14:21       ` Tomasz Figa
2020-06-30 14:21         ` Tomasz Figa
2020-06-30 14:21         ` Tomasz Figa
2020-06-30 14:37         ` Andy Shevchenko
2020-06-30 14:37           ` Andy Shevchenko
2020-06-30 14:37           ` Andy Shevchenko
2020-06-30 14:40           ` Tomasz Figa
2020-06-30 14:40             ` Tomasz Figa
2020-06-30 14:40             ` Tomasz Figa
2020-07-01  7:58             ` Dongchun Zhu [this message]
2020-07-01  7:58               ` Dongchun Zhu
2020-07-01  7:58               ` Dongchun Zhu
2020-06-30 17:07   ` Tomasz Figa
2020-06-30 17:07     ` Tomasz Figa
2020-06-30 17:07     ` Tomasz Figa
2020-06-30 18:47     ` Sakari Ailus
2020-06-30 18:47       ` Sakari Ailus
2020-06-30 18:47       ` Sakari Ailus
2020-07-01  8:47       ` Dongchun Zhu
2020-07-01  8:47         ` Dongchun Zhu
2020-07-01  8:47         ` Dongchun Zhu
2020-07-01  9:00         ` Sakari Ailus
2020-07-01  9:00           ` Sakari Ailus
2020-07-01  9:00           ` Sakari Ailus

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=1593590324.17166.30.camel@mhfsdcap03 \
    --to=dongchun.zhu@mediatek.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=bingbu.cao@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=drinkcat@chromium.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=louis.kuo@mediatek.com \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shengnan.wang@mediatek.com \
    --cc=sj.huang@mediatek.com \
    --cc=srv_heupstream@mediatek.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.