mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 4/6] leds: class: store the color index in struct led_classdev
Date: Thu, 6 Apr 2023 08:52:31 +0200	[thread overview]
Message-ID: <f4616854-a0eb-9abe-e411-402c91cab43d@traphandler.com> (raw)
In-Reply-To: <CAHp75Ve_=Gzpg9GO=2dqTKWuyU-Podezv_YSwHLqFPHXk1DUxg@mail.gmail.com>



On 28/03/2023 19:15, Andy Shevchenko wrote:
> On Tue, Mar 28, 2023 at 7:15 PM Jean-Jacques Hiblot
> <jjhiblot@traphandler.com> wrote:
>>
>> This information might be useful for more than only deriving the led's
>> name. And since we have this information, we can expose it in the sysfs.
> 
> ...
> 
>> +Date:          March 2023
>> +KernelVersion: 6.3
> 
> Outdated version.
> 
> ...
> 
>> +               Color of the led.
>> +
>> +               This is a read-only file. Reading this file returns the color
>> +               of the led as a string (ex: "red", "green").
> 
> There are no strict rules about colour and I don't think it's a good
> idea. Why in such a case is it different to label? My proposal here at
> least documenting that the colour must follow one of the existing
> naming standards (like RGB in hex, HTML, or name in accordance with
> chosen standard).
Actually the colors are defined in an array: led_colors (led-core.c: 88)
So the color is one of the following: white, red, reen, blue, amber, 
violet, yellow, ir, multicolor, rgb

There is mention in the TODO file of changing the way RGB leds are 
handled and the RGB leds would probably show the hex RGB values here.

> 
> Yet, it won't technically prevent abusing that, but at least will show
> the intention and allow pointing out to the bugs or develop user space
> tooling based on existing parsers (if any).
> 

  reply	other threads:[~2023-04-06  6:52 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 monochromatic LEDs 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 [this message]
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

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=f4616854-a0eb-9abe-e411-402c91cab43d@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®