Dan,

On 10/11/19 3:06 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
> 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 <dmur...@ti.com>
> ---
>  .../ABI/testing/sysfs-class-led-multicolor    |  36 +++
>  .../bindings/leds/leds-class-multicolor.txt   |   4 +-
>  Documentation/leds/index.rst                  |   1 +
>  Documentation/leds/leds-class-multicolor.rst  |  96 +++++++
>  drivers/leds/Kconfig                          |  10 +
>  drivers/leds/Makefile                         |   1 +
>  drivers/leds/led-class-multicolor.c           | 271 ++++++++++++++++++
>  include/linux/led-class-multicolor.h          | 143 +++++++++
>  8 files changed, 560 insertions(+), 2 deletions(-)
>  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..3d1f9d726c70
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-class-led-multicolor
> @@ -0,0 +1,36 @@
> +What:                /sys/class/leds/<led>/brightness
> +Date:                Sept 2019
> +KernelVersion:       5.5
> +Contact:     Dan Murphy <dmur...@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/<color>_max_intensity
> +
> +             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>/colors/<color>_intensity
> +Date:                Sept 2019
> +KernelVersion:       5.5
> +Contact:     Dan Murphy <dmur...@ti.com>
> +Description: read/write
> +             The <color>_intensity file is created based on the color
> +             defined by the registrar of the class.
> +             There is one file per color presented.
> +
> +             The value of the color is from 0 to
> +             /sys/class/leds/<led>/colors/<color>_max_intensity.
> +
> +What:                /sys/class/leds/<led>/colors/<color>_max_intensity
> +Date:                Sept 2019
> +KernelVersion:       5.5
> +Contact:     Dan Murphy <dmur...@ti.com>
> +Description: read only
> +             Maximum intensity level for the LED color.
> diff --git a/Documentation/devicetree/bindings/leds/leds-class-multicolor.txt 
> b/Documentation/devicetree/bindings/leds/leds-class-multicolor.txt
> index 8619c9bf1811..4b1bd82f2a42 100644
> --- a/Documentation/devicetree/bindings/leds/leds-class-multicolor.txt
> +++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.txt
> @@ -10,7 +10,7 @@ The nodes and properties defined in this document are 
> unique to the multicolor
>  LED class.  Common LED nodes and properties are inherited from the common.txt
>  within this documentation directory.
>  
> -Required LED Child properties:
> +Required LED child properties:
>       - color : For multicolor LED support this property should be defined as
>                 LED_COLOR_ID_MULTI and further definition can be found in
>                 include/linux/leds/common.h.
> @@ -26,7 +26,7 @@ led-controller@30 {
>               #size-cells = <0>;
>               reg = <1>;
>               color = <LED_COLOR_ID_MULTI>;
> -             function = LED_FUNCTION_STATUS;
> +             function = LED_FUNCTION_CHARGING;
>  

So this went to wrong patch.

-- 
Best regards,
Jacek Anaszewski

Reply via email to