linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Pavel Machek <pavel@ucw.cz>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
	lee.jones@linaro.org, jingoohan1@gmail.com,
	jacek.anaszewski@gmail.com, dmurphy@ti.com, robh+dt@kernel.org,
	mark.rutland@arm.com, b.zolnierkie@samsung.com,
	dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fbdev@vger.kernel.org,
	"H. Nikolaus Schaller" <hns@goldelico.com>
Subject: Re: [PATCH 1/2] backlight: lm3630a: add an enable gpio for the HWEN pin
Date: Sun, 15 Sep 2019 19:34:29 +0200	[thread overview]
Message-ID: <20190915193429.5feef312@aktux> (raw)
In-Reply-To: <20190915165204.GA4857@bug>

Hi,

On Sun, 15 Sep 2019 18:52:04 +0200
Pavel Machek <pavel@ucw.cz> wrote:

> Hi!
> 
> > > > > Is this needed?
> > > > > 
> > > > > This is a remove path, not a power management path, and we have no idea
> > > > > what the original status of the pin was anyway?
> > > > >     
> > > > 
> > > > Looking at Ishdn on page 5 of the datasheet, switching it off everytime
> > > > possible seems not needed. We would need to call chip_init() everytime
> > > > we enable the gpio or live with default values.
> > > > Therefore I did decide to not put it into any power management path.
> > > > But switching it on and not switching it off feels so unbalanced.     
> > > 
> > > Either the power consumed by the controller when strings aren't lit up
> > > matters, in which case the driver should implement proper power
> > > management or it doesn't matter and changing the pin state isn't needed.
> > > 
> > > I'm happy with either of the above but this looks like a third way,
> > > where eager users could hack in a bit of extra power management by
> > > forcing drivers to unbind. 
> > >   
> > I think I will take the simple way. I am quite sure that the power
> > consumption with HWEN on and leds off does not matter. If someone
> > later comes up and finds out that I misread the datasheet, things
> > are prepared to be improved.  
> 
> Dunno.. if the power consumption does not matter, why does the chip have the enable
> pin in the first place, and why do we bother supporting it? We could hardcode the
> pin to enabled as well..

Well, I agree having the pin and no power saving seems not to make
sense. Two points here: I think it is a good idea to properly describe
the hardware in the devicetree. What to do with that information is
another thing.
A problem is that at the moment I cannot easily measure consumption
of the chip. Hmm, even testing a solution which disables the pin while
the chip is not in use, is not so easy.
But wait...
I could use a wrong gpio but one that I can easily monitor to check if
the pin is toggled. And set the real pin to high by some other means.
And then use the real gpio to check if timings are correct (waiting
enough after enabling the chip, e.g.

Regards,
Andreas

  reply	other threads:[~2019-09-15 17:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-08 20:37 [PATCH 0/2] backlight_lm3630a: add enable_gpios property Andreas Kemnade
2019-09-08 20:37 ` [PATCH 1/2] backlight: lm3630a: add an enable gpio for the HWEN pin Andreas Kemnade
2019-09-09 10:57   ` Daniel Thompson
2019-09-09 20:13     ` Andreas Kemnade
2019-09-10 10:21       ` Daniel Thompson
2019-09-10 19:06         ` Andreas Kemnade
2019-09-15 16:52           ` Pavel Machek
2019-09-15 17:34             ` Andreas Kemnade [this message]
2019-09-08 20:37 ` [PATCH 2/2] dt-bindings: backlight: lm3630a: add enable_gpios Andreas Kemnade
2019-09-09 10:59   ` Daniel Thompson

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=20190915193429.5feef312@aktux \
    --to=andreas@kemnade.info \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel.thompson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hns@goldelico.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@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).