From: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: <lee.jones@linaro.org>, <pavel@ucw.cz>, <robh+dt@kernel.org>,
<sven.schwermer@disruptive-technologies.com>,
<krzysztof.kozlowski+dt@linaro.org>, <johan+linaro@kernel.org>,
<marijn.suijten@somainline.org>, <jacek.anaszewski@gmail.com>,
<linux-leds@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 6/6] leds: Add a multicolor LED driver to group monochromatic LEDs
Date: Thu, 6 Apr 2023 08:54:38 +0200 [thread overview]
Message-ID: <a8a22af2-3d11-bda8-5453-768e2174dc08@traphandler.com> (raw)
In-Reply-To: <CAHp75Vca0SKPkyPM_14Zny+Vn0a=hKWRfYW9qzTpN8AVZ_R_YQ@mail.gmail.com>
On 28/03/2023 19:20, Andy Shevchenko wrote:
> On Tue, Mar 28, 2023 at 7:15 PM Jean-Jacques Hiblot
> <jjhiblot@traphandler.com> wrote:
>>
>> Grouping multiple monochrome LEDs into a multicolor LED device has a few
>> benefits over handling the group in user-space:
>> - The state of the LEDs relative to each other is consistent. In other
>> words, if 2 threads competes to set the LED to green and red, the
>> end-result cannot be black or yellow.
>> - The multicolor LED as a whole can be driven through the sysfs LED
>> interface.
>
> ...
>
>> +config LEDS_GROUP_MULTICOLOR
>> + tristate "LEDs group multi-color support"
>> + depends on OF || COMPILE_TEST
>
> Why is OF a dependency?
> Can't we make it a firmware provider agnostic solution from day 1?
That would be possible, unfortunately I have no way of testing the ACPI
stuff. That's why I prefer sticking to OF.
>
>> + help
>> + This option enables support for monochrome LEDs that are
>> + grouped into multicolor LEDs.
>> + This useful in the case where LEDs of different colors are
>
> This is
>
>> + physically grouped in a single multi-color LED and driven
>> + by a controller that doesn't have multi-color support.
>> +
>> + To compile this driver as a module, choose M here: the module
>> + will be called leds-group-multicolor.
>
> ...
>
>> + led_cdev = devm_of_led_get_optional(dev, count);
>
> I don't see how this is OF specific to this driver. Maybe it needs to
> be patched first, so we will have something non-OF specific?
>
>> + if (IS_ERR(led_cdev))
>> + return dev_err_probe(dev, PTR_ERR(led_cdev), "Unable to get LED #%d",
>> + count);
>
> At least we need to have a FIXME or so here.
>
prev parent reply other threads:[~2023-04-06 6:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 16:15 [PATCH v8 0/6] Add a multicolor LED driver for groups of " Jean-Jacques Hiblot
2023-03-28 16:15 ` [PATCH v8 1/6] devres: provide devm_krealloc_array() Jean-Jacques Hiblot
2023-03-28 16:15 ` [PATCH v8 2/6] leds: class: simplify the implementation of devm_of_led_get() Jean-Jacques Hiblot
2023-03-28 16:15 ` [PATCH v8 3/6] leds: provide devm_of_led_get_optional() Jean-Jacques Hiblot
2023-03-28 16:15 ` [PATCH v8 4/6] leds: class: store the color index in struct led_classdev Jean-Jacques Hiblot
2023-03-28 17:15 ` Andy Shevchenko
2023-04-06 6:52 ` Jean-Jacques Hiblot
2023-03-28 16:15 ` [PATCH v8 5/6] dt-bindings: leds: Add binding for a multicolor group of LEDs Jean-Jacques Hiblot
2023-03-28 16:15 ` [PATCH v8 6/6] leds: Add a multicolor LED driver to group monochromatic LEDs Jean-Jacques Hiblot
2023-03-28 17:20 ` Andy Shevchenko
2023-04-06 6:54 ` Jean-Jacques Hiblot [this message]
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=a8a22af2-3d11-bda8-5453-768e2174dc08@traphandler.com \
--to=jjhiblot@traphandler.com \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jacek.anaszewski@gmail.com \
--cc=johan+linaro@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
--cc=sven.schwermer@disruptive-technologies.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
all inboxes | Powered by JetHome®