Messages in this thread | | | Date | Thu, 23 Mar 2023 12:33:39 +0100 | From | Pavel Machek <> | Subject | Re: [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] | |