[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250916110217.45894-3-professorjonny98@gmail.com>
Date: Tue, 16 Sep 2025 23:02:15 +1200
From: Jonathan Brophy <professorjonny98@...il.com>
To: lee Jones <lee@...nel.org>,
Pavel Machek <pavel@...nel.org>,
Jonathan Brophy <professor_jonny@...mail.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Radoslav Tsvetkov <rtsvetkov@...dotech.eu>
Cc: devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-leds@...r.kernel.org
Subject: [PATCH 3/5] dt-bindings: leds: Add YAML bindings for Virtual Color LED Group driver
From: Jonathan Brophy <professor_jonny@...mail.com>
Document Virtual Color device tree bindings.
Co-developed-by: Radoslav Tsvetkov <rtsvetkov@...dotech.eu>
Signed-off-by: Jonathan Brophy <professor_jonny@...mail.com>
---
.../leds/leds-group-virtualcolor.yaml | 79 +++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/leds-group-virtualcolor.yaml
diff --git a/Documentation/devicetree/bindings/leds/leds-group-virtualcolor.yaml b/Documentation/devicetree/bindings/leds/leds-group-virtualcolor.yaml
new file mode 100644
index 000000000..945058415
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-group-virtualcolor.yaml
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/leds/leds-group-virtualcolor.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+title: Virtual LED Group with Priority Control
+
+maintainers:
+ - Radoslav Tsvetkov <rtsvetkov@...dotech.eu>
+
+description: |
+ Virtual LED group driver that combines multiple monochromatic LEDs into logical
+ groups with priority-based control. The driver ensures only the highest-priority
+ LED state is active at any given time.
+
+allOf:
+ - $ref: leds.yaml#
+
+properties:
+ compatible:
+ const: leds-group-virtualcolor
+
+required:
+ - compatible
+
+patternProperties:
+ "^led@[0-9a-f]$":
+ type: object
+ $ref: leds.yaml#
+ properties:
+ reg:
+ maxItems: 1
+ monochromatic-leds:
+ type: array
+ items:
+ maxItems: 1
+ $ref: /schemas/types.yaml#/definitions/phandle
+ minItems: 1
+ description: List of phandles to the monochromatic LEDs to group
+ priority:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Priority level for LED activation (higher value means higher priority)
+ blink-delay-on:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Time in milliseconds the LED is on during blink
+ blink-delay-off:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Time in milliseconds the LED is off during blink
+
+ required:
+ - reg
+ - monochromatic-leds
+
+additionalProperties: false
+
+examples:
+ - |
+ leds {
+ compatible = "leds-group-virtualcolor";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ label = "status:red";
+ monochromatic-leds = <&led_red>;
+ priority = <2>;
+ blink-delay-on = <500>;
+ blink-delay-off = <500>;
+ };
+
+ led@1 {
+ reg = <1>;
+ label = "status:green";
+ monochromatic-leds = <&led_green>;
+ priority = <1>;
+ };
+ };
\ No newline at end of file
--
2.43.0
Powered by blists - more mailing lists