linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Jean-Jacques Hiblot <jjhiblot@ti.com>
Cc: mark.rutland@arm.com,
	Daniel Thompson <daniel.thompson@linaro.org>,
	jingoohan1@gmail.com, tomi.valkeinen@ti.com,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	robh+dt@kernel.org, jacek.anaszewski@gmail.com,
	lee.jones@linaro.org, linux-leds@vger.kernel.org, dmurphy@ti.com
Subject: Re: [PATCH 3/4] backlight: add led-backlight driver
Date: Fri, 5 Jul 2019 12:08:51 +0200	[thread overview]
Message-ID: <20190705100851.zn2jkipj4fxq5we6@devuan> (raw)
In-Reply-To: <a8886ae9-31ec-de4c-0a83-5f681582a0b9@ti.com>

Hi!

> > > > Also still relevant is whether the LED device is being correctly
> > > > modelled if the act of turning on the LED doesn't, in fact, turn the LED
> > > > on. Is it *really* a correct implementation of an LED device that
> > > > setting it to LED_FULL using sysfs doesn't cause it to light up?
> > > What I understood from the discussion between Rob and Tomi is that the
> > > child-node of the LED controller should be considered a backlight device,
> > > not a simple LED. I'm not sure if the sysfs interface is still relevant in
> > > that case. Maybe it should just be disabled by the backlight driver
> > > (possible with led_sysfs_disable())
> > led_sysfs_disable() sounds like a sensible change but that's not quite
> > what I mean.
> > 
> > It is more a thought experiment to see if the power control *should* be
> > implemented by the backlight. Consider what happens if we *don't*
> > enable CONFIG_BACKLIGHT_LED in the kernel: we would still have an LED
> > device and it would not work correctly.
> > 
> > In other words I naively expect turning on an LED using the LED API
> > (any of them, sysfs or kernel) to result in the LED turning on.
> > Implementing a workaround in the client for what appears to be
> > something missing in the LED driver strikes me as odd. Why shouldn't
> > the regulator be managed in the LED driver?
> 
> I see your point. Indeed having the regulator handled in the LED-core makes
> sense in a lot of situations
> 
> I'll think about it.

For the record, I also believe regulator and enable gpio should be
handled in the core.

									Pavel
PS please trim down the quoted text.									
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@ucw.cz>
To: Jean-Jacques Hiblot <jjhiblot@ti.com>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
	jacek.anaszewski@gmail.com, robh+dt@kernel.org,
	mark.rutland@arm.com, lee.jones@linaro.org, jingoohan1@gmail.com,
	dmurphy@ti.com, linux-leds@vger.kernel.org,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	tomi.valkeinen@ti.com
Subject: Re: [PATCH 3/4] backlight: add led-backlight driver
Date: Fri, 5 Jul 2019 12:08:51 +0200	[thread overview]
Message-ID: <20190705100851.zn2jkipj4fxq5we6@devuan> (raw)
Message-ID: <20190705100851.VTmVTHP9M3YFZJGOK5d3Rk6fkd7jyxXQrrSBBoaGmI8@z> (raw)
In-Reply-To: <a8886ae9-31ec-de4c-0a83-5f681582a0b9@ti.com>

Hi!

> > > > Also still relevant is whether the LED device is being correctly
> > > > modelled if the act of turning on the LED doesn't, in fact, turn the LED
> > > > on. Is it *really* a correct implementation of an LED device that
> > > > setting it to LED_FULL using sysfs doesn't cause it to light up?
> > > What I understood from the discussion between Rob and Tomi is that the
> > > child-node of the LED controller should be considered a backlight device,
> > > not a simple LED. I'm not sure if the sysfs interface is still relevant in
> > > that case. Maybe it should just be disabled by the backlight driver
> > > (possible with led_sysfs_disable())
> > led_sysfs_disable() sounds like a sensible change but that's not quite
> > what I mean.
> > 
> > It is more a thought experiment to see if the power control *should* be
> > implemented by the backlight. Consider what happens if we *don't*
> > enable CONFIG_BACKLIGHT_LED in the kernel: we would still have an LED
> > device and it would not work correctly.
> > 
> > In other words I naively expect turning on an LED using the LED API
> > (any of them, sysfs or kernel) to result in the LED turning on.
> > Implementing a workaround in the client for what appears to be
> > something missing in the LED driver strikes me as odd. Why shouldn't
> > the regulator be managed in the LED driver?
> 
> I see your point. Indeed having the regulator handled in the LED-core makes
> sense in a lot of situations
> 
> I'll think about it.

For the record, I also believe regulator and enable gpio should be
handled in the core.

									Pavel
PS please trim down the quoted text.									
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2019-07-05 10:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 15:14 [PATCH 0/4] Add a generic driver for LED-based backlight Jean-Jacques Hiblot
2019-07-01 15:14 ` [PATCH 1/4] leds: of: create a child device if the LED node contains a "compatible" string Jean-Jacques Hiblot
2019-07-01 15:14 ` [PATCH 2/4] devicetree: Update led binding Jean-Jacques Hiblot
2019-07-01 15:20   ` Dan Murphy
2019-07-01 15:14 ` [PATCH 3/4] backlight: add led-backlight driver Jean-Jacques Hiblot
2019-07-02  9:54   ` Daniel Thompson
2019-07-02 10:59     ` Jean-Jacques Hiblot
2019-07-02 13:04       ` Daniel Thompson
2019-07-02 15:17         ` Jean-Jacques Hiblot
2019-07-03  9:44           ` Daniel Thompson
2019-07-03 10:02             ` Jean-Jacques Hiblot
2019-07-05 10:08               ` Pavel Machek [this message]
2019-07-05 10:08                 ` Pavel Machek
2019-07-05 10:33                 ` Jean-Jacques Hiblot
2019-07-05 10:33                   ` Jean-Jacques Hiblot
2019-07-01 15:14 ` [PATCH 4/4] devicetree: Add led-backlight binding Jean-Jacques Hiblot
2019-07-02  9:58   ` Daniel Thompson
2019-07-02 11:11     ` Jean-Jacques Hiblot
2019-07-05 10:11   ` Pavel Machek
2019-07-05 10:11     ` Pavel Machek
2019-07-05 10:14 ` [PATCH 0/4] Add a generic driver for LED-based backlight Pavel Machek
2019-07-05 10:14   ` Pavel Machek
2019-07-05 10:29   ` Daniel Thompson
2019-07-05 10:29     ` Daniel Thompson
2019-07-05 11:34   ` Jean-Jacques Hiblot
2019-07-05 11:34     ` Jean-Jacques Hiblot
2019-07-05 23:23   ` Sebastian Reichel
2019-07-05 23:23     ` Sebastian Reichel

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=20190705100851.zn2jkipj4fxq5we6@devuan \
    --to=pavel@ucw.cz \
    --cc=daniel.thompson@linaro.org \
    --cc=dmurphy@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jingoohan1@gmail.com \
    --cc=jjhiblot@ti.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=tomi.valkeinen@ti.com \
    /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).