mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Vesa Jääskeläinen" <dachaac@gmail.com>
To: Dan Murphy <dmurphy@ti.com>, jacek.anaszewski@gmail.com, pavel@ucw.cz
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v19 04/18] leds: multicolor: Introduce a multicolor class definition
Date: Thu, 9 Apr 2020 08:25:34 +0300	[thread overview]
Message-ID: <78a577ba-667e-804a-b59f-6cc442adb4eb@gmail.com> (raw)
In-Reply-To: <20200402204311.14998-5-dmurphy@ti.com>

Hi,

On 2.4.2020 23.42, 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
> 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@ti.com>
> ---
>   .../ABI/testing/sysfs-class-led-multicolor    |  42 ++++
>   Documentation/leds/index.rst                  |   1 +
>   Documentation/leds/leds-class-multicolor.rst  |  95 ++++++++
>   drivers/leds/Kconfig                          |  10 +
>   drivers/leds/Makefile                         |   1 +
>   drivers/leds/led-class-multicolor.c           | 206 ++++++++++++++++++
>   include/linux/led-class-multicolor.h          | 121 ++++++++++
>   7 files changed, 476 insertions(+)
>   create mode 100644 Documentation/ABI/testing/sysfs-class-led-multicolor
>   create mode 100644 Documentation/leds/leds-class-multicolor.rst
>   create mode 100644 drivers/leds/led-class-multicolor.c
>   create mode 100644 include/linux/led-class-multicolor.h
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-led-multicolor b/Documentation/ABI/testing/sysfs-class-led-multicolor
> new file mode 100644
> index 000000000000..1f50324d24fd
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-led-multicolor
> @@ -0,0 +1,42 @@
> +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 * color_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.
> +
> +What:		/sys/class/leds/<led>/color_index
> +Date:		March 2020
> +KernelVersion:	5.8
> +Contact:	Dan Murphy <dmurphy@ti.com>
> +Description:	read
> +		The color_index array, when read, will output the LED colors
> +		by name as they are indexed in the color_intensity array.
> +
> +What:		/sys/class/leds/<led>/num_colors
> +Date:		March 2020
> +KernelVersion:	5.8
> +Contact:	Dan Murphy <dmurphy@ti.com>
> +Description:	read
> +		The num_colors indicates the number of LEDs defined in the
> +		color_intensity and color_index arrays.
> +
> +What:		/sys/class/leds/<led>/color_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
> +		color_index array.

For what it is worth --

I see that this interface covers our use cases and I assume that GPIO 
LED and PWM LED drivers can be implemented for this after this set is 
integrated.

Thanks,
Vesa Jääskeläinen

  parent reply	other threads:[~2020-04-09  5:25 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 20:42 [PATCH v19 00/18] Multicolor Framework (array edition) Dan Murphy
2020-04-02 20:42 ` [PATCH v19 01/18] dt: bindings: Add multicolor class dt bindings documention Dan Murphy
2020-04-06 20:12   ` Pavel Machek
2020-04-02 20:42 ` [PATCH v19 02/18] dt-bindings: leds: Add multicolor ID to the color ID list Dan Murphy
2020-04-02 20:42 ` [PATCH v19 03/18] " Dan Murphy
2020-04-06 20:13   ` Pavel Machek
2020-04-14 13:21     ` Dan Murphy
2020-04-02 20:42 ` [PATCH v19 04/18] leds: multicolor: Introduce a multicolor class definition Dan Murphy
2020-04-03  3:47   ` Randy Dunlap
2020-04-03 14:39     ` Dan Murphy
2020-04-05 15:08       ` Jacek Anaszewski
     [not found]         ` <f09dadc9-f1ed-091b-f241-2f40b48f1117@ti.com>
2020-04-05 16:28           ` Randy Dunlap
2020-04-05 16:31             ` Dan Murphy
2020-04-06 14:33   ` Dan Murphy
2020-04-06 19:25   ` Jacek Anaszewski
2020-04-07 14:52     ` Dan Murphy
2020-04-07 21:08   ` Jacek Anaszewski
2020-04-08 16:33     ` Dan Murphy
2020-04-08 16:35   ` Dan Murphy
2020-04-14 13:23     ` Dan Murphy
2020-04-09  5:25   ` Vesa Jääskeläinen [this message]
2020-04-14 13:21     ` Dan Murphy
2020-04-02 20:42 ` [PATCH v19 05/18] dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers Dan Murphy
2020-04-02 20:42 ` [PATCH v19 06/18] leds: lp50xx: Add the LP50XX family of the RGB LED driver Dan Murphy
2020-04-02 20:43 ` [PATCH v19 07/18] dt: bindings: lp55xx: Be consistent in the document with LED acronym Dan Murphy
2020-04-02 20:43 ` [PATCH v19 08/18] dt: bindings: lp55xx: Update binding for Multicolor Framework Dan Murphy
2020-04-02 20:43 ` [PATCH v19 09/18] ARM: dts: n900: Add reg property to the LP5523 channel node Dan Murphy
2020-04-02 20:43 ` [PATCH v19 10/18] ARM: dts: imx6dl-yapp4: Add reg property to the lp5562 " Dan Murphy
2020-04-02 20:43 ` [PATCH v19 11/18] ARM: dts: ste-href: Add reg property to the LP5521 channel nodes Dan Murphy
2020-04-02 20:43 ` [PATCH v19 12/18] leds: lp55xx: Convert LED class registration to devm_* Dan Murphy
2020-04-02 20:43 ` [PATCH v19 13/18] leds: lp55xx: Add multicolor framework support to lp55xx Dan Murphy
2020-04-02 20:43 ` [PATCH v19 14/18] leds: lp5523: Update the lp5523 code to add multicolor brightness function Dan Murphy
2020-04-02 20:43 ` [PATCH v19 15/18] leds: lp5521: Add multicolor framework multicolor brightness support Dan Murphy
2020-04-02 20:43 ` [PATCH v19 16/18] leds: lp55xx: Fix checkpatch file permissions issues Dan Murphy
2020-04-02 20:43 ` [PATCH v19 17/18] leds: lp5523: Fix checkpatch issues in the code Dan Murphy
2020-04-02 20:43 ` [PATCH v19 18/18] dt: bindings: Update lp55xx binding to recommended LED naming 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=78a577ba-667e-804a-b59f-6cc442adb4eb@gmail.com \
    --to=dachaac@gmail.com \
    --cc=dmurphy@ti.com \
    --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

Powered by JetHome