linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: <jacek.anaszewski@gmail.com>, <devicetree@vger.kernel.org>,
	<linux-leds@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v26 03/15] leds: multicolor: Introduce a multicolor class definition
Date: Sat, 6 Jun 2020 11:39:09 -0500	[thread overview]
Message-ID: <92d71058-a75b-fd3f-59b1-5133be1c21b5@ti.com> (raw)
In-Reply-To: <20200606155324.GA21130@amd>

Pavek

Thanks for the review

On 6/6/20 10:53 AM, Pavel Machek wrote:
> Hi!
>
>> Introduce a multicolor class that groups colored LEDs
>> within a LED node.
>>
>> The multi color class groups monochrome LEDs and allows controlling two
>> aspects of the final combined color: hue and lightness. The former is
>> controlled via the intensity file and the latter is controlled
>> via brightness file.
>>
>> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
>> Signed-off-by: Dan Murphy <dmurphy@ti.com>
>> diff --git a/Documentation/ABI/testing/sysfs-class-led-multicolor b/Documentation/ABI/testing/sysfs-class-led-multicolor
>> new file mode 100644
>> index 000000000000..7d33a82a4b07
>> --- /dev/null
>> +++ b/Documentation/ABI/testing/sysfs-class-led-multicolor
>> @@ -0,0 +1,34 @@
>> +What:		/sys/class/leds/<led>/brightness
>> +Date:		March 2020
>> +KernelVersion:	5.8
>> +Contact:	Dan Murphy <dmurphy@ti.com>
>> +Description:	read/write
>> +		Writing to this file will update all LEDs within the group to a
>> +		calculated percentage of what each color LED intensity is set
>> +		to. The percentage is calculated for each grouped LED via the
>> +		equation below:
>> +		led_brightness = brightness * multi_intensity/max_brightness
>> +
>> +		For additional details please refer to
>> +		Documentation/leds/leds-class-multicolor.rst.
>> +
>> +		The value of the color is from 0 to
>> +		/sys/class/leds/<led>/max_brightness.
> It is not too clear to me what "color" means here.
>
> It would be worth mentioning that this is single integer.

OK I will update this


>> +What:		/sys/class/leds/<led>/multi_index
>> +Date:		March 2020
>> +KernelVersion:	5.8
>> +Contact:	Dan Murphy <dmurphy@ti.com>
>> +Description:	read
>> +		The multi_index array, when read, will output the LED colors
>> +		by name as they are indexed in the multi_intensity file.
> This should specify that it is array of strings.

Yeah this sounds better


>> +What:		/sys/class/leds/<led>/multi_intensity
>> +Date:		March 2020
>> +KernelVersion:	5.8
>> +Contact:	Dan Murphy <dmurphy@ti.com>
>> +Description:	read/write
>> +		Intensity level for the LED color within the array.
>> +		The intensities for each color must be entered based on the
>> +		multi_index array.
> I'd mention here that it is array of integers, and what the maximum
> values are.

Same here.  I will indicate max value cannot exceed max_brightness

But that was what the max_intensity file was for in prior patchsets.

>
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -9533,6 +9533,14 @@ F:	Documentation/devicetree/bindings/leds/
>>   F:	drivers/leds/
>>   F:	include/linux/leds.h
>>   
>> +LED MULTICOLOR FRAMEWORK
>> +M:	Dan Murphy <dmurphy@ti.com>
>> +L:	linux-leds@vger.kernel.org
> I'd like to be mentioned here, too. "M: Pavel Machek
> <pavel@ucw.cz>". And I'm not sure if I should be taking MAINTAINER
> file update through a LED tree. Should definitely go to separate
> patch.

Oh definitely.  I thought it was implied that you and Jacek are both 
Maintainers as well.

I will add you but will wait to see if Jacek wants to be added.

I will separate this out and make it a separate patch


>
>> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
>> index 9cdc4cfc5d11..fe7d90d4fa23 100644
>> --- a/drivers/leds/Kconfig
>> +++ b/drivers/leds/Kconfig
>> @@ -30,6 +30,16 @@ config LEDS_CLASS_FLASH
>>   	  for the flash related features of a LED device. It can be built
>>   	  as a module.
>>   
>> +config LEDS_CLASS_MULTI_COLOR
>> +	tristate "LED MultiColor LED Class Support"
> "LED MultiColor Class Support"

OK.

Dan

>
> Best regards,
> 									Pavel

  reply	other threads:[~2020-06-06 16:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04 12:04 [PATCH v26 00/15] Multicolor Framework v26 Dan Murphy
2020-06-04 12:04 ` [PATCH v26 01/15] dt: bindings: Add multicolor class dt bindings documention Dan Murphy
2020-06-04 22:40   ` Rob Herring
2020-06-05 12:42     ` Dan Murphy
2020-06-04 12:04 ` [PATCH v26 02/15] leds: Add multicolor ID to the color ID list Dan Murphy
2020-06-04 12:04 ` [PATCH v26 03/15] leds: multicolor: Introduce a multicolor class definition Dan Murphy
2020-06-06 15:53   ` Pavel Machek
2020-06-06 16:39     ` Dan Murphy [this message]
2020-06-06 19:59       ` Jacek Anaszewski
2020-06-08 14:34         ` Dan Murphy
2020-06-08 19:41           ` Jacek Anaszewski
2020-06-09 11:45             ` Dan Murphy
2020-06-04 12:04 ` [PATCH v26 04/15] dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers Dan Murphy
2020-06-04 22:59   ` Rob Herring
2020-06-08 18:21     ` Dan Murphy
2020-06-04 12:04 ` [PATCH v26 05/15] leds: lp50xx: Add the LP50XX family of the RGB LED driver Dan Murphy
2020-06-04 12:04 ` [PATCH v26 06/15] dt-bindings: leds: Convert leds-lp55xx to yaml Dan Murphy
2020-06-04 23:04   ` Rob Herring
2020-06-05  0:08     ` Dan Murphy
2020-06-08 17:50       ` Rob Herring
2020-06-04 12:04 ` [PATCH v26 07/15] ARM: dts: n900: Add reg property to the LP5523 channel node Dan Murphy
2020-06-04 12:04 ` [PATCH v26 08/15] ARM: dts: imx6dl-yapp4: Add reg property to the lp5562 " Dan Murphy
2020-06-04 12:04 ` [PATCH v26 09/15] ARM: dts: ste-href: Add reg property to the LP5521 channel nodes Dan Murphy
2020-06-04 12:04 ` [PATCH v26 10/15] leds: lp55xx: Convert LED class registration to devm_* Dan Murphy
2020-06-04 12:05 ` [PATCH v26 11/15] leds: lp55xx: Add multicolor framework support to lp55xx Dan Murphy
2020-06-04 12:05 ` [PATCH v26 12/15] leds: lp5523: Update the lp5523 code to add multicolor brightness function Dan Murphy
2020-06-04 12:05 ` [PATCH v26 13/15] leds: lp5521: Add multicolor framework multicolor brightness support Dan Murphy
2020-06-04 12:05 ` [PATCH v26 14/15] leds: lp55xx: Fix file permissions to use DEVICE_ATTR macros Dan Murphy
2020-06-04 12:05 ` [PATCH v26 15/15] leds: lp5523: Fix various formatting issues in the code Dan Murphy
2020-06-06 15:57 ` [PATCH v26 00/15] Multicolor Framework v26 Pavel Machek
2020-06-08 18:35   ` Dan Murphy

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=92d71058-a75b-fd3f-59b1-5133be1c21b5@ti.com \
    --to=dmurphy@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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;
as well as URLs for NNTP newsgroup(s).