mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Vesa Jääskeläinen" <dachaac@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Dan Murphy <dmurphy@ti.com>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, robh+dt@kernel.org
Subject: Re: [PATCH v2 2/2] leds: lp50xx: Add the LP50XX family of the RGB LED driver
Date: Sun, 20 Jan 2019 08:51:48 +0200	[thread overview]
Message-ID: <eeb72aad-6ff1-4744-5c43-ab82593f5df2@gmail.com> (raw)
In-Reply-To: <20190119214606.GA4712@amd>

Hi Pavel,

On 19/01/2019 23.46, Pavel Machek wrote:
> Hi!
> 
>>> Moreover, I think that RGB LED class with configurable
>>> brightness-model, and with possible color range adjustments via
>>> icc-profiles or something similar, is the best solution that has been
>>> proposed so far. It is just flexible.
>>>
>>> I'd like to capitalize on the ideas shared in this thread and have
>>> finally LED RGB class materialized.
>>>
>>
>> I have now updated my github code with my understanding of the discussion:
>> https://github.com/vesajaaskelainen/linux/tree/wip-multi-color-led
>>
>> Commits:
>> - dt-bindings: leds: Introduce linux,default-brightness-model for all leds
>> https://github.com/vesajaaskelainen/linux/commit/4ffb21d644056686096226bbede7c8c78b0254c2
>> - drivers: leds: Add core support for multi color element LEDs
>> https://github.com/vesajaaskelainen/linux/commit/627f38bb78cebc694b8e6d735fb088c87925435d
>> - dt-bindings: leds: leds-pwm: Introduce multi color element leds support
>> https://github.com/vesajaaskelainen/linux/commit/ef6c5730d621e79ea0b02470caa83bc39439536a
>> - WIP: drivers: leds: leds-pwm: Add multi color element LED support.
>> https://github.com/vesajaaskelainen/linux/commit/0430a27823d9162926424b32c23be1c53eb9cbe2
>>
>> First two commits are common and could be taken before I am happy with the
>> pwm led driver changes. This new conditional feature flag makes it a bit
>> harder. Of course one option would be to require it to be enabled.
>>
>> Current set of concepts:
>> - brightness-model: hardware, onoff, linear
>>    - could be extended in future with other modes like hsv if wanted
> 
> Would it be enough to tell userspace what is relation between values
> it writes and output power?
> 
> Onoff is subset of linear, I guess. We already have max_brightness in
> the API.

Btw. there is slight problem with led trigger framework which is kinda 
visible with "onoff" vs "linear" settings.

If you configure color like:

echo onoff > brightness_model
echo 32 0 32 255 > color

You get not so bright pink color. And if you then enable blinking:

echo heartbeat > trigger

Then it blinks with not so bright pink color as expected.

However if you do it:

echo linear > brightness_model
echo 255 0 255 32 > color

You once again you get not so bright pink color. However when you enable 
blinking:

echo heartbeat > trigger

Then it blinks with very bright pink color.

Reason I believe is because trigger uses either values 0 or 255 for 
brightness when controlling. To fix the issue I believe trigger 
mechanism should be adjusted to allowing one to control ON brightness level.

I would recommend fixing this trigger problem with future patches for it.

Thanks,
Vesa Jääskeläinen

  parent reply	other threads:[~2019-01-20  6:51 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 21:17 [PATCH v2 1/2] dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers Dan Murphy
2019-01-14 21:17 ` [PATCH v2 2/2] leds: lp50xx: Add the LP50XX family of the RGB LED driver Dan Murphy
2019-01-15 21:47   ` Jacek Anaszewski
2019-01-15 22:22     ` Pavel Machek
2019-01-16  0:20       ` Dan Murphy
2019-01-16 10:55         ` Pavel Machek
2019-01-16 18:41           ` Dan Murphy
2019-01-16 22:04             ` Pavel Machek
2019-01-16 23:33               ` Dan Murphy
2019-01-17 10:06                 ` Pavel Machek
2019-01-17 13:27                   ` Dan Murphy
2019-01-17 21:10             ` Jacek Anaszewski
2019-01-18  0:02               ` RGB LED class " Pavel Machek
2019-01-18 15:57                 ` Dan Murphy
2019-01-28 23:03                   ` Pavel Machek
2019-01-18 22:13                 ` Jacek Anaszewski
2019-01-19 21:36                   ` Pavel Machek
2019-01-20 15:30                     ` Jacek Anaszewski
2019-01-21 19:38                       ` Jacek Anaszewski
2019-01-28 23:04                       ` Pavel Machek
2019-01-18 13:45               ` Dan Murphy
2019-01-18 13:58                 ` Dan Murphy
2019-01-20  6:42                   ` Vesa Jääskeläinen
2019-01-22 21:39                     ` Jacek Anaszewski
2019-01-22 22:44                       ` Dan Murphy
2019-01-23 21:52                         ` Jacek Anaszewski
2019-01-24 21:00                           ` Dan Murphy
2019-01-24 21:55                             ` Jacek Anaszewski
2019-01-29 13:56                               ` Dan Murphy
2019-01-29 20:19                                 ` Jacek Anaszewski
2019-01-29 20:26                                   ` Dan Murphy
2019-01-29 21:45                                     ` Pavel Machek
2019-01-29 21:46                                       ` Dan Murphy
2019-01-29 21:53                                     ` Jacek Anaszewski
2019-01-20 15:32                 ` Jacek Anaszewski
2019-01-17 21:08           ` Jacek Anaszewski
2019-01-19 19:11             ` Vesa Jääskeläinen
2019-01-19 21:46               ` Pavel Machek
2019-01-19 22:44                 ` Vesa Jääskeläinen
2019-01-20  6:51                 ` Vesa Jääskeläinen [this message]
2019-01-21 13:27               ` Dan Murphy
2019-01-21 15:12                 ` Vesa Jääskeläinen
2019-01-24 20:32     ` Dan Murphy
2019-01-24 21:14       ` Jacek Anaszewski
2019-01-15 21:42 ` [PATCH v2 1/2] dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers Jacek Anaszewski

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=eeb72aad-6ff1-4744-5c43-ab82593f5df2@gmail.com \
    --to=dachaac@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --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

Powered by JetHome