linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Marek Behun <marek.behun@nic.cz>,
	linux-leds@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
	Dan Murphy <dmurphy@ti.com>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v3 1/2] dt-bindings: leds: add cznic,turris-omnia-leds binding
Date: Mon, 13 Jul 2020 23:28:48 +0200	[thread overview]
Message-ID: <01ead073-71e0-6bd3-7fcf-32aa0fd9c7a5@gmail.com> (raw)
In-Reply-To: <20200713150634.GA176775@bogus>

On 7/13/20 5:06 PM, Rob Herring wrote:
> On Mon, Jul 13, 2020 at 12:11:51AM +0200, Jacek Anaszewski wrote:
>> On 7/12/20 11:40 PM, Marek Behun wrote:
>>> On Sun, 12 Jul 2020 23:27:07 +0200
>>> Jacek Anaszewski <jacek.anaszewski@gmail.com> wrote:
>>>
>>>>> +            multi-led@0 {
>>>>> +                reg = <0>;
>>>>> +                color = <LED_COLOR_ID_MULTI>;
>>>>> +                function = LED_FUNCTION_POWER;
>>>>
>>>> Please provide child nodes for each color LED. Let's stick
>>>> to the bindings closely and not make any deviations from
>>>> the beginning.
>>>
>>> Why? It would make sense if there were devices using this controller
>>> having other configuration, but on Omnia, all LEDs are RGB.
>>>
>>> Also, if I do this, should I also make the driver check in the probe
>>> function whether the per-channel child nodes are correct? Eg. if they
>>> are always three: one for red, one for green and one for blue? Or
>>> should the driver ignore this and only the device tree binding specify
>>> it?
>>>
>>> Because the way the driver is written now, it only registers
>>> multi-color RGB LEDs.
>>
>> This is not RGB framework, but multicolor framework. It is not justified
>> to pretend that RGB is default. Unless you would state that clearly in
>> the comment in DT, but that should be agreed upon with Rob.
> 
> If the LEDs are fixed in h/w and never vary for this controller, then
> they don't need to be in DT. However, is it really possible that a
> channel only supports 1 color of LED? I don't think so.

Theoretically we could allow for registering two LEDs as LED multi
color device and the other one as monochrome LED class device
but I admit that this would be a bit convoluted and entail unnecessary
complexity in the driver.

So I'm OK with no child nodes for these bindings, but let's add some
comment justifying that.

-- 
Best regards,
Jacek Anaszewski

  reply	other threads:[~2020-07-13 21:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-12 21:05 [PATCH v3 0/2] Add Turris Omnia LEDs driver Marek Behún
2020-07-12 21:06 ` [PATCH v3 1/2] dt-bindings: leds: add cznic,turris-omnia-leds binding Marek Behún
2020-07-12 21:27   ` Jacek Anaszewski
2020-07-12 21:40     ` Marek Behun
2020-07-12 22:11       ` Jacek Anaszewski
2020-07-13 15:06         ` Rob Herring
2020-07-13 21:28           ` Jacek Anaszewski [this message]
2020-07-12 21:06 ` [PATCH v3 2/2] leds: initial support for Turris Omnia LEDs Marek Behún

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=01ead073-71e0-6bd3-7fcf-32aa0fd9c7a5@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=pavel@ucw.cz \
    --cc=robh@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).