dt-bindings: clock: fixed: Define a preferred node name
Subsystems (2)
Rob Herring (Arm)
maintainerPATCH 1/1 dt-bindings: clock: fixed: Define a preferred node name
Define "clock-<freq>" as the preferred node name for fixed-clock and fixed-factor-clock. There isn't much of an existing pattern for names of these nodes. The most frequent patterns are a prefix or suffix of "clk", but there's a bunch that don't follow any sort of pattern. We could use "clock-controller-.*", but these nodes aren't really a controller in any way. So let's at least align with part of that and use 'clock-'.
For now this only serves as documentation as the schema still allows anything to avoid lots of additional warnings for something low priority to fix. Once a "no deprecated" mode is added to the tools, warnings can be enabled selectively.
--- Documentation/devicetree/bindings/clock/fixed-clock.yaml | 7 +++++++ .../devicetree/bindings/clock/fixed-factor-clock.yaml | 8 ++++++++ 2 files changed, 15 insertions(+)
Documentation/devicetree/bindings/clock/fixed-clock.yaml +7 -0
@@ -11,6 +11,13 @@ maintainers: - Stephen Boyd <[email protected]> properties: + $nodename: + anyOf: + - description: Preferred name is 'clock-<freq>' + pattern: "^clock-([0-9]+|[a-z0-9-]+)$" + - description: Any name allowed + deprecated: true + compatible: const: fixed-clock
Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml +8 -0
@@ -11,6 +11,14 @@ maintainers: - Stephen Boyd <[email protected]> properties: + $nodename: + anyOf: + - description: + Preferred name is 'clock-<freq>' if the input frequency is fixed + pattern: "^clock-([0-9]+|[0-9a-z-]+)$" + - description: Any name allowed + deprecated: true + compatible: enum: - fixed-factor-clock
Signature · 1 line
2.43.0
Stephen Boyd
maintainerQuoting Rob Herring (Arm) (2024-04-25 11:38:09)
Documentation/devicetree/bindings/clock/fixed-clock.yaml maintainers: · line 16
Quoted 11 lines
Documentation/devicetree/bindings/clock/fixed-clock.yaml +3
-0@@ -11,6 +11,13 @@ maintainers: - Stephen Boyd <[email protected]> properties: + $nodename: + anyOf: + - description: Preferred name is 'clock-<freq>'
Is the preferred value of <freq> the clock-frequency property? Should say that explicitly somehow so that it's clear.
Quoted 12 lines
Documentation/devicetree/bindings/clock/fixed-clock.yaml +4
-0+ pattern: "^clock-([0-9]+|[a-z0-9-]+)$" + - description: Any name allowed + deprecated: true + compatible: const: fixed-clockDocumentation/devicetree/bindings/clock/fixed-factor-clock.yaml +0
-0
Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml maintainers: · line 17
Quoted 7 lines
Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml +4
-0@@ -11,6 +11,14 @@ maintainers: - Stephen Boyd <[email protected]> properties: + $nodename: + anyOf: + - description: + Preferred name is 'clock-<freq>' if the input frequency is fixed
Similar question here. Is <freq> supposed to be the output clock frequency?
Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml maintainers: · line 20
Quoted 3 lines
Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml +3
-0+ pattern: "^clock-([0-9]+|[0-9a-z-]+)$" + - description: Any name allowed + deprecated: true
I hope that deprecating this doesn't cause folks to try to clean things up and then break code that's depending on the node name to be the name of the clk. We don't want that string name to be important but it is sometimes.
Rob Herring
maintainerQuoted 9 lines · Stephen Boyd
Quoting Rob Herring (Arm) (2024-04-25 11:38:09)
Quoted 7 lines
Documentation/devicetree/bindings/clock/fixed-clock.yaml +0
-0@@ -11,6 +11,13 @@ maintainers: - Stephen Boyd <[email protected]>
Quoted 7 lines
Documentation/devicetree/bindings/clock/fixed-clock.yaml maintainers: · line 16
Quoted 4 lines
Documentation/devicetree/bindings/clock/fixed-clock.yaml +3
-0properties: + $nodename: + anyOf: + - description: Preferred name is 'clock-<freq>'Is the preferred value of <freq> the clock-frequency property? Should say that explicitly somehow so that it's clear.
Yes, will add.
Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/clock/fixed-clock.yaml +4
-0+ pattern: "^clock-([0-9]+|[a-z0-9-]+)$" + - description: Any name allowed + deprecated: true + compatible: const: fixed-clockDocumentation/devicetree/bindings/clock/fixed-factor-clock.yaml +0
-0@@ -11,6 +11,14 @@ maintainers: - Stephen Boyd <[email protected]>
Quoted 7 lines
Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml maintainers: · line 17
Quoted 5 lines
Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml +4
-0properties: + $nodename: + anyOf: + - description: + Preferred name is 'clock-<freq>' if the input frequency is fixedSimilar question here. Is <freq> supposed to be the output clock frequency?
Yes.
Quoted 9 lines
Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml maintainers: · line 20
Quoted 4 lines
Documentation/devicetree/bindings/clock/fixed-factor-clock.yaml +3
-0+ pattern: "^clock-([0-9]+|[0-9a-z-]+)$" + - description: Any name allowed + deprecated: trueI hope that deprecating this doesn't cause folks to try to clean things up and then break code that's depending on the node name to be the name of the clk. We don't want that string name to be important but it is sometimes.
Right. Leaving things as-is is the intent. We won't be enabling any "no deprecated" mode by default when it is added.
Rob