acc32b69fb88ec3aad236c24185fae71ce75c04d
[openwrt/openwrt.git] /
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
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Add DT bindings for the LEDs multicolor class framework.
10 Add multicolor ID to the color ID list for device tree bindings.
11
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>
19 ---
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
24
25 --- /dev/null
26 +++ b/Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml
27 @@ -0,0 +1,37 @@
28 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
29 +%YAML 1.2
30 +---
31 +$id: http://devicetree.org/schemas/leds/leds-class-multicolor.yaml#
32 +$schema: http://devicetree.org/meta-schemas/core.yaml#
33 +
34 +title: Common properties for the multicolor LED class.
35 +
36 +maintainers:
37 + - Dan Murphy <dmurphy@ti.com>
38 +
39 +description: |
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.
48 +
49 +patternProperties:
50 + "^multi-led@([0-9a-f])$":
51 + type: object
52 + description: Represents the LEDs that are to be grouped.
53 + properties:
54 + color:
55 + const: 8 # LED_COLOR_ID_MULTI
56 + description: |
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.
59 +
60 + $ref: "common.yaml#"
61 +
62 + required:
63 + - color
64 +...
65 --- a/include/dt-bindings/leds/common.h
66 +++ b/include/dt-bindings/leds/common.h
67 @@ -29,7 +29,8 @@
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
74
75 /* Standard LED functions */
76 #define LED_FUNCTION_ACTIVITY "activity"