Skip to contentSkip to conversation

dt-bindings: leds: Allow differently named multicolor leds

PATCH Applied J. Neuschäfer 2 participants 2 messages Jan 1 – Jan 9

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 dt-bindings: leds: Allow differently named multicolor leds

In some cases, for example when using multiple instances of leds-group-multicolor, a board may have multiple multi-leds which can't be distinguished by unit address. In such cases it should be possible to name them differently, for example multi-led-0 and multi-led-1. This patch adds another node name pattern to leds-class-multicolor.yaml to allow such names.

---
V3:
- Combine patterns into one, instead of using oneOf schema
- Change examples in commit message to use numeric suffixes
- Restrict pattern to allow only numeric suffixes after the dash following Rob Herring's suggestion

V2:
- Link: https://lore.kernel.org/r/[email protected]
- Add Krzysztof's review tag
- mention leds-group-multicolor in the commit message
- rebase on 6.15-rc1

Link to v1: https://lore.kernel.org/r/[email protected]

---
 Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/leds/leds-class-multicolor.yaml +1 -1
index bb40bb9e036ee0..7bfc3d807acae3 100644
@@ -21,7 +21,7 @@ description: |
 
 properties:
   $nodename:
-    pattern: "^multi-led(@[0-9a-f])?$"
+    pattern: "^multi-led(@[0-9a-f]|-[0-9]+)?$"
 
   color:
     description: |

---
base-commit: 9448598b22c50c8a5bb77a9103e2d49f134c9578
change-id: 20250209-multi-led-9991e205befd

Best regards,

Signature · 1 line
J. Neuschäfer <[email protected]>
maintainer Applied
#1 lore raw

Re: (subset) [PATCH v3] dt-bindings: leds: Allow differently named multicolor leds

Quoted 8 lines · J. Neuschäfer

In some cases, for example when using multiple instances of leds-group-multicolor, a board may have multiple multi-leds which can't be distinguished by unit address. In such cases it should be possible to name them differently, for example multi-led-0 and multi-led-1. This patch adds another node name pattern to leds-class-multicolor.yaml to allow such names.

[...]

Applied, thanks!

[1/1] dt-bindings: leds: Allow differently named multicolor leds

      commit: df3cfc33b24dd238a85b7c51ec052ffcf00aaf09

--
Lee Jones [李琼斯]