linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: leds: leds-gpio: fix & extend node regex
@ 2021-03-10  7:00 Rafał Miłecki
  2021-03-12  7:44 ` Marek Behun
  2021-03-16 22:31 ` Rob Herring
  0 siblings, 2 replies; 11+ messages in thread
From: Rafał Miłecki @ 2021-03-10  7:00 UTC (permalink / raw)
  To: Pavel Machek, Dan Murphy, Rob Herring
  Cc: Jacek Anaszewski, linux-leds, devicetree, Florian Fainelli,
	Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

The old regex allowed only 1 character to follow the "led-" prefix which
was most likely just an overlook. Fix it and while at it allow dashes in
node names. It allows more meaningful names and it helpful e.g. when
having the same function name with 2 different colors. For example:
1. led-power-white
2. led-power-blue

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 Documentation/devicetree/bindings/leds/leds-gpio.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/leds/leds-gpio.yaml b/Documentation/devicetree/bindings/leds/leds-gpio.yaml
index 7ad2baeda0b0..ae46a43e480f 100644
--- a/Documentation/devicetree/bindings/leds/leds-gpio.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-gpio.yaml
@@ -21,7 +21,7 @@ properties:
 patternProperties:
   # The first form is preferred, but fall back to just 'led' anywhere in the
   # node name to at least catch some child nodes.
-  "(^led-[0-9a-f]$|led)":
+  "(^led-[0-9a-f][0-9a-f-]*$|led)":
     type: object
 
     $ref: common.yaml#
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-03-23 23:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10  7:00 [PATCH] dt-bindings: leds: leds-gpio: fix & extend node regex Rafał Miłecki
2021-03-12  7:44 ` Marek Behun
2021-03-12  7:52   ` Rafał Miłecki
2021-03-12  8:23     ` Marek Behun
2021-03-12  9:12       ` Rafał Miłecki
2021-03-12  9:26         ` Marek Behun
2021-03-12  9:42           ` Rafał Miłecki
2021-03-16 22:31 ` Rob Herring
2021-03-16 22:44   ` Rafał Miłecki
2021-03-23 22:02     ` Rob Herring
2021-03-23 22:07       ` Rafał Miłecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).