Re: [PATCH v19 04/18] leds: multicolor: Introduce a multicolor class definition

From: Jacek Anaszewski
Date: Sun Apr 05 2020 - 11:08:52 EST


Dan,

On 4/3/20 4:39 PM, Dan Murphy wrote:
> Randy
>
> Thanks for the review
>
> On 4/2/20 10:47 PM, Randy Dunlap wrote:
>> Hi,
>> Here are a few changes for you to consider:
>>
>> On 4/2/20 1:42 PM, Dan Murphy wrote:
>>> Introduce a multicolor class that groups colored LEDs
>>> within a LED node.
>>>
>>> The multi color class groups monochrome LEDs and allows controlling two
>> ÂÂÂÂÂÂ multicolor
> Ack
>>
>>> aspects of the final combined color: hue and lightness. The former is
>>> controlled via <color>_intensity files and the latter is controlled
>>> via brightness file.
>>>
>>> Signed-off-by: Dan Murphy <dmurphy@xxxxxx>
>>> ---
>>
>>> diff --git a/Documentation/leds/leds-class-multicolor.rst
>>> b/Documentation/leds/leds-class-multicolor.rst
>>> new file mode 100644
>>> index 000000000000..5bb004999248
>>> --- /dev/null
>>> +++ b/Documentation/leds/leds-class-multicolor.rst
>>> @@ -0,0 +1,95 @@
>>> +====================================
>>> +Multi Color LED handling under Linux
>> ÂÂÂ Multicolor
> Ack
>>
>>> +====================================
>>> +
>>> +Description
>>> +===========
>>> +The multi color class groups monochrome LEDs and allows controlling two
>> ÂÂÂÂÂÂÂ multicolor
> Ack
>>
>>> +aspects of the final combined color: hue and lightness. The former is
>>> +controlled via the color_intensity array file and the latter is
>>> controlled
>>> +via brightness file.
>>> +
>>> +For more details on hue and lightness notions please refer to
>>> +https://en.wikipedia.org/wiki/CIECAM02.
>>> +
>>> +Multicolor Class Control
>>> +========================
>>> +The multicolor class presents files that groups the colors as
>>> indexes in an
>>> +array. These files are children under the LED parent node created
>>> by the
>>> +led_class framework. The led_class framework is documented in
>>> led-class.rst
>>> +within this documentation directory.
>>> +
>>> +Each colored LED will be indexed under the color_* files. The order
>>> of the
>>> +colors are arbitrary the color_index file can be read to determine
>>> the color
>>> +to index value.
>>> +
>>> +The color_index file is an array that contains the string list of
>>> the colors as
>>> +they are defined in each color_* array file.
>>> +
>>> +The color_intensity is an array that can be read or written to for the
>>> +individual color intensities. All elements within this array must
>>> be written in
>>> +order for the color LED intensities to be updated.
>>> +
>>> +The color_max_intensity is an array that can be read to indicate
>>> each color LED
>>> +maximum intensity value.
>>> +
>>> +The num_color_leds file returns the total number of color LEDs that are
>>> +presented in each color_* array.
>>> +
>>> +Directory Layout Example
>>> +========================
>>> +root:/sys/class/leds/multicolor:status# ls -lR
>>> +-rw-r--r--ÂÂÂ 1 rootÂÂÂÂ rootÂÂÂÂÂÂÂÂÂ 4096 Oct 19 16:16 brightness
>>> +-r--r--r--ÂÂÂ 1 rootÂÂÂÂ rootÂÂÂÂÂÂÂÂÂ 4096 Oct 19 16:16 color_index
>>> +-rw-r--r--ÂÂÂ 1 rootÂÂÂÂ rootÂÂÂÂÂÂÂÂÂ 4096 Oct 19 16:16
>>> color_intensity
>>> +-r--r--r--ÂÂÂ 1 rootÂÂÂÂ rootÂÂÂÂÂÂÂÂÂ 4096 Oct 19 16:16 num_color_leds
>>> +
>>> +Multicolor Class Brightness Control
>>> +===================================
>>> +The multiclor class framework will calculate each monochrome LEDs
>>> intensity.
>> ÂÂÂÂÂÂÂ multicolor
> Ack
>>
>>> +
>>> +The brightness level for each LED is calculated based on the color LED
>>> +intensity setting divided by the parent max_brightness setting
>>> multiplied by
>>> +the requested brightness.
>>> +
>>> +led_brightness = brightness * color_intensity/max_brightness
>>> +
>>> +Example:
>>> +A user first writes the color_intensity file with the brightness levels
>>> +that for each LED that is necessary to achieve a blueish violet
>>> output from a
>> drop first "that".
> Ack
>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ that are
>> necessaryÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ from an
> Ack and NACK the "from an". It is from a since R is a consonant

But it sounds like a vowel and this rule for creating articles
"applies to the sound of the letter beginning the word, not just the
letter itself" [0].

[0] https://www.grammar.com/a-vs-an-when-to-use/

--
Best regards,
Jacek Anaszewski