All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Sven Schwermer <sven@svenschwermer.de>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-pwm@vger.kernel.org
Cc: Sven Schwermer <sven.schwermer@disruptive-technologies.com>,
	pavel@ucw.cz, robh+dt@kernel.org, thierry.reding@gmail.com,
	u.kleine-koenig@pengutronix.de, lee.jones@linaro.org
Subject: Re: [RFC PATCH 0/2] Multicolor PWM LED support
Date: Wed, 26 Jan 2022 22:26:22 +0100	[thread overview]
Message-ID: <609c58de-67ee-3c1d-512b-66bad482addb@gmail.com> (raw)
In-Reply-To: <70bfabe5-7f53-5c80-e1de-dc73e85232de@svenschwermer.de>

Hi Sven,

On 1/26/22 8:51 AM, Sven Schwermer wrote:
> Hi Jacek,
> 
> Thank you for your feedback!
> 
> On 1/25/22 23:31, Jacek Anaszewski wrote:
> 
>>>    1. Currently, the max-brightness property is expected as a 
>>> property to
>>>       the multi-led node. That seems consistent with the existing
>>>       multicolor class code, but I'm wondering whether it would make
>>>       sense to have a max-brigthness for the individual LEDs as well?
>>
>> For the proper mixed color calculation all sub-leds should have
>> the same max_brightness as the global max_brightness.
>>
>> Look at how sub-led intensities are calculated in
>> led_mc_calc_color_components().
>>
>> See also [0] and [1].
> 
> OK, thanks. That makes sense.
> 
>>>    2. The current multi-led node definition calls for a node index which
>>>       would in turn require the reg property to be set within the node.
>>>       In this context, that doesn't seem to make sense. Should this
>>>       requirement be lifted from leds-class-multicolor.yaml?
>>
>> reg is required for all DT nodes with address unit in the name.
>> If you skipped the address unit, then reg would be also not required.
> 
> Yes, I realize this. However, leds-class-multicolor.yaml [0] requires 
> the address unit: "^multi-led@([0-9a-f])$"

This is only an example and nothing prevents you from dropping address
unit in leds-pwm-multicolor DT bindings. We don't have common DT parser
for multicolor LEDs and it will be hard to come up with something that
will fit neatly for all possible LED controllers anyway.

Dropping address unit from leds-class-multicolor.yaml would be too much
since it is useful in some cases, see e.g. [2].

[2] Documentation/devicetree/bindings/leds/leds-lp50xx.yaml

-- 
Best regards,
Jacek Anaszewski

  reply	other threads:[~2022-01-26 21:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25  9:22 [RFC PATCH 0/2] Multicolor PWM LED support sven
2022-01-25  9:22 ` [RFC PATCH 1/2] dt-bindings: leds: Add multicolor PWM LED bindings sven
2022-01-25 14:25   ` Rob Herring
2022-01-25  9:22 ` [RFC PATCH 2/2] leds: Add PWM multicolor driver sven
2022-01-25 23:01   ` Jacek Anaszewski
2022-01-25 22:31 ` [RFC PATCH 0/2] Multicolor PWM LED support Jacek Anaszewski
2022-01-26  7:51   ` Sven Schwermer
2022-01-26 21:26     ` Jacek Anaszewski [this message]
2022-01-26  8:08 ` Alexander Dahl

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=609c58de-67ee-3c1d-512b-66bad482addb@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=sven.schwermer@disruptive-technologies.com \
    --cc=sven@svenschwermer.de \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.