lkml.org 
[lkml]   [2023]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] Add multicolor support to BlinkM LED driver
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-03-27 01:14    [W:1.034 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site