Skip to contentSkip to conversation

dt-bindings: opp: Allow multi-worded OPP entry names

PATCH Superseded Dmitry Osipenko 3 participants 4 messages Oct 24, 2021 – Oct 28, 2021

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 dt-bindings: opp: Allow multi-worded OPP entry names

Not all OPP entries fit into a single word. In particular NVIDIA Tegra OPP tables use multi-word names where first part is freq and second voltage because different hardware versions use different voltages for the same freqs. Allow OPP entry to have multi-worded name separated by hyphen. This silences DT checker warnings about wrong naming scheme.

---

Changelog:

v3: - Viresh Kumar suggested that we shouldn't support postfix variant.
I dropped variant with postfix naming scheme and multi-wording support of table names.

v2: - In addition to a multi-wording support, support of the postfix
*-opp-table naming scheme is added to the updated pattern.

 Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/opp/opp-v2-base.yaml +1 -1
index ae3ae4d39843..f79343960539 100644
@@ -33,7 +33,7 @@ properties:
     type: boolean
 
 patternProperties:
-  '^opp-?[0-9]+$':
+  '^opp(-[0-9]+)*$':
     type: object
     description:
       One or more OPP nodes describing voltage-current-frequency combinations.
Signature · 1 line
2.33.1
#1 lore raw
Quoted 27 lines · Dmitry Osipenko

Not all OPP entries fit into a single word. In particular NVIDIA Tegra OPP tables use multi-word names where first part is freq and second voltage because different hardware versions use different voltages for the same freqs. Allow OPP entry to have multi-worded name separated by hyphen. This silences DT checker warnings about wrong naming scheme.

---

Changelog:

v3: - Viresh Kumar suggested that we shouldn't support postfix variant.
I dropped variant with postfix naming scheme and multi-wording support of table names.

v2: - In addition to a multi-wording support, support of the postfix
*-opp-table naming scheme is added to the updated pattern.

 Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/opp/opp-v2-base.yaml +0 -0
index ae3ae4d39843..f79343960539 100644

Documentation/devicetree/bindings/opp/opp-v2-base.yaml properties: · line 39

Quoted 8 lines
Documentation/devicetree/bindings/opp/opp-v2-base.yaml +1 -1
@@ -33,7 +33,7 @@ properties:
     type: boolean
 
 patternProperties:
-  '^opp-?[0-9]+$':
+  '^opp(-[0-9]+)*$':
     type: object
     description:
       One or more OPP nodes describing voltage-current-frequency combinations.

LGTM, will apply once Rob Acks it.

Signature · 1 line
viresh
maintainer
#2 lore raw
In reply to Dmitry Osipenko
Quoted 27 lines · Dmitry Osipenko

Not all OPP entries fit into a single word. In particular NVIDIA Tegra OPP tables use multi-word names where first part is freq and second voltage because different hardware versions use different voltages for the same freqs. Allow OPP entry to have multi-worded name separated by hyphen. This silences DT checker warnings about wrong naming scheme.

---

Changelog:

v3: - Viresh Kumar suggested that we shouldn't support postfix variant.
I dropped variant with postfix naming scheme and multi-wording support of table names.

v2: - In addition to a multi-wording support, support of the postfix
*-opp-table naming scheme is added to the updated pattern.

 Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/opp/opp-v2-base.yaml +0 -0
index ae3ae4d39843..f79343960539 100644

Documentation/devicetree/bindings/opp/opp-v2-base.yaml properties: · line 36

Quoted 5 lines
Documentation/devicetree/bindings/opp/opp-v2-base.yaml +1 -1
@@ -33,7 +33,7 @@ properties:
     type: boolean
 
 patternProperties:
-  '^opp-?[0-9]+$':
+  '^opp(-[0-9]+)*$':

This drops support for cases like 'opp1' which there are a ton of. It should be '^opp(-?[0-9]+)*$' if we want to keep that support.

I'd love to be stricter, but trying to find a balance.

Rob

#3 lore raw

28.10.2021 00:19, Rob Herring пишет:

Quoted 30 lines · Dmitry Osipenko
Quoted 29 lines

Not all OPP entries fit into a single word. In particular NVIDIA Tegra OPP tables use multi-word names where first part is freq and second voltage because different hardware versions use different voltages for the same freqs. Allow OPP entry to have multi-worded name separated by hyphen. This silences DT checker warnings about wrong naming scheme.

---

Changelog:

v3: - Viresh Kumar suggested that we shouldn't support postfix variant.
I dropped variant with postfix naming scheme and multi-wording support of table names.

v2: - In addition to a multi-wording support, support of the postfix
*-opp-table naming scheme is added to the updated pattern.

 Documentation/devicetree/bindings/opp/opp-v2-base.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/opp/opp-v2-base.yaml +0 -0
index ae3ae4d39843..f79343960539 100644
@@ -33,7 +33,7 @@ properties:
     type: boolean
 
Quoted 8 lines

Documentation/devicetree/bindings/opp/opp-v2-base.yaml properties: · line 36

Quoted 3 lines
Documentation/devicetree/bindings/opp/opp-v2-base.yaml +1 -1
 patternProperties:
-  '^opp-?[0-9]+$':
+  '^opp(-[0-9]+)*$':

This drops support for cases like 'opp1' which there are a ton of. It should be '^opp(-?[0-9]+)*$' if we want to keep that support.

I'd love to be stricter, but trying to find a balance.

Good catch, let me make v4.