1 From 5c7f8ffe741daae7f8d811a2037b2693f02c90c5 Mon Sep 17 00:00:00 2001
2 From: Dan Murphy <dmurphy@ti.com>
3 Date: Mon, 13 Jul 2020 10:45:31 -0500
4 Subject: [PATCH] dt: bindings: Add multicolor class dt bindings documention
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Add DT bindings for the LEDs multicolor class framework.
10 Add multicolor ID to the color ID list for device tree bindings.
12 CC: Rob Herring <robh@kernel.org>
13 Reviewed-by: Rob Herring <robh@kernel.org>
14 Acked-by: Pavel Machek <pavel@ucw.cz>
15 Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
16 Signed-off-by: Dan Murphy <dmurphy@ti.com>
17 Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
18 Signed-off-by: Pavel Machek <pavel@ucw.cz>
20 .../bindings/leds/leds-class-multicolor.yaml | 37 +++++++++++++++++++
21 include/dt-bindings/leds/common.h | 3 +-
22 2 files changed, 39 insertions(+), 1 deletion(-)
23 create mode 100644 Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
26 +++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
28 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
31 +$id: http://devicetree.org/schemas/leds/leds-class-multicolor.yaml#
32 +$schema: http://devicetree.org/meta-schemas/core.yaml#
34 +title: Common properties for the multicolor LED class.
37 + - Dan Murphy <dmurphy@ti.com>
40 + Bindings for multi color LEDs show how to describe current outputs of
41 + either integrated multi-color LED elements (like RGB, RGBW, RGBWA-UV
42 + etc.) or standalone LEDs, to achieve logically grouped multi-color LED
43 + modules. This is achieved by adding multi-led nodes layer to the
44 + monochrome LED bindings.
45 + The nodes and properties defined in this document are unique to the multicolor
46 + LED class. Common LED nodes and properties are inherited from the common.txt
47 + within this documentation directory.
50 + "^multi-led@([0-9a-f])$":
52 + description: Represents the LEDs that are to be grouped.
55 + const: 8 # LED_COLOR_ID_MULTI
57 + For multicolor LED support this property should be defined as
58 + LED_COLOR_ID_MULTI which can be found in include/linux/leds/common.h.
60 + $ref: "common.yaml#"
65 --- a/include/dt-bindings/leds/common.h
66 +++ b/include/dt-bindings/leds/common.h
68 #define LED_COLOR_ID_VIOLET 5
69 #define LED_COLOR_ID_YELLOW 6
70 #define LED_COLOR_ID_IR 7
71 -#define LED_COLOR_ID_MAX 8
72 +#define LED_COLOR_ID_MULTI 8
73 +#define LED_COLOR_ID_MAX 9
75 /* Standard LED functions */
76 #define LED_FUNCTION_ACTIVITY "activity"