lkml.org 
[lkml]   [2022]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 1/3] dt-bindings: pwm: Fix node name pattern
Date
It looks like it was intended to allow two types of node names with the
binding:

- With unit address, e.g. pwm@1f000000
- With a suffix, e.g. pwm-clk

However the pattern regex only correctly matches the first variant,
as well as some incorrect ones.

Fix the regex to match only two patterns shown above. (Either unit
address starting with @ and following with one or more hexademical
digit or arbitrary suffix stating with - and at least one symbol long)

Fixes: 89650a1e3b6f ("dt-bindings: pwm: Convert PWM bindings to json-schema")
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
Documentation/devicetree/bindings/pwm/pwm.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pwm/pwm.yaml b/Documentation/devicetree/bindings/pwm/pwm.yaml
index 3c01f85029e5..4926fe65886f 100644
--- a/Documentation/devicetree/bindings/pwm/pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/pwm.yaml
@@ -13,7 +13,7 @@ select: false

properties:
$nodename:
- pattern: "^pwm(@.*|-[0-9a-f])*$"
+ pattern: "^pwm(@[0-9a-f]+|-.+)?$"

"#pwm-cells":
description:
--
2.30.2
\
 
 \ /
  Last update: 2022-01-20 17:16    [W:2.376 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site