From: Pavel Machek <pavel@ucw.cz>
To: Joseph Strauss <jstrauss@mailbox.org>
Cc: lee@kernel.org, jansimon.moeller@gmx.de, conor@kernel.org,
christophe.jaillet@wanadoo.fr, linux-leds@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] Add multicolor support to BlinkM LED driver
Date: Thu, 23 Mar 2023 12:33:39 +0100 [thread overview]
Message-ID: <ZBw5E4ecNvfgd0RB@duo.ucw.cz> (raw)
In-Reply-To: <20221228010958.9670-1-jstrauss@mailbox.org>
[-- Attachment #1: Type: text/plain, Size: 1876 bytes --]
Hi!
> In the blinkm_probe function, the multicolor LED class is registered
> after the regular LED classes. The blinkm_set_mc_brightness() function
> had to be added to calculate the three color components and then set the
> fields of the blinkm_data structure accordingly.
It needs to be either single multicolor LED or three separate
LEDs. But not both at the same time.
> +++ b/Documentation/leds/leds-blinkm.rst
> @@ -13,9 +13,27 @@ The device accepts RGB and HSB color values through separate commands.
> Also you can store blinking sequences as "scripts" in
> the controller and run them. Also fading is an option.
>
> -The interface this driver provides is 2-fold:
> +The interface this driver provides is 3-fold:
>
> -a) LED class interface for use with triggers
> +a) LED multicolor class interface for use with triggers
> +#######################################################
> +
> +The registration follows the scheme::
> +
> + blinkm-<i2c-bus-nr>-<i2c-device-nr>-multi
> +
> + $ ls -h /sys/class/leds/blinkm-1-9-multi
> + brightness device max_brightness multi_index multi_intensity power subsystem trigger uevent
> +
Yeah, that does not really match the
naming. /sys/class/leds/blinkm-1-9:rgb:indicator ? See
Documentation/leds/well-known-leds.txt and possibly extend it so that
future general-purpose LEDs use similar naming.
> +b) LED class interface for use with triggers
> ############################################
>
So the b) should be removed.
>
> -b) Sysfs group to control rgb, fade, hsb, scripts ...
> +c) Sysfs group to control rgb, fade, hsb, scripts ...
> #####################################################
>
And c) should be deprecated and removed in future.
Best regards,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2023-03-23 11:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-28 1:09 Joseph Strauss
2023-01-09 16:56 ` Lee Jones
2023-03-01 14:26 ` Lee Jones
2023-03-15 16:16 ` Lee Jones
2023-03-22 23:21 ` Joseph Strauss
2023-03-23 12:28 ` Lee Jones
2023-03-23 11:33 ` Pavel Machek [this message]
2023-03-25 15:53 ` Joseph Strauss
2023-03-25 16:09 ` Pavel Machek
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=ZBw5E4ecNvfgd0RB@duo.ucw.cz \
--to=pavel@ucw.cz \
--cc=christophe.jaillet@wanadoo.fr \
--cc=conor@kernel.org \
--cc=jansimon.moeller@gmx.de \
--cc=jstrauss@mailbox.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.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
all inboxes | Powered by JetHome®