dt-bindings: pwm: Fix cros-ec-pwm example dtc 'reg' warning
Subsystems (3)
Rob Herring
maintainerPATCH 1/1 dt-bindings: pwm: Fix cros-ec-pwm example dtc 'reg' warning
The example for the CrOS EC PWM is incomplete and now generates a dtc warning:
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.example.dts:17.11-23.11:
Warning (unit_address_vs_reg): /example-0/cros-ec@0: node has a unit name, but no reg or ranges property
Fixing this results in more warnings as a parent spi node is needed as well.
--- .../bindings/pwm/google,cros-ec-pwm.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml +12 -5
@@ -31,10 +31,17 @@ additionalProperties: false examples: - | - cros-ec@0 { - compatible = "google,cros-ec-spi"; - cros_ec_pwm: ec-pwm { - compatible = "google,cros-ec-pwm"; - #pwm-cells = <1>; + spi { + #address-cells = <1>; + #size-cells = <0>; + + cros-ec@0 { + compatible = "google,cros-ec-spi"; + reg = <0>; + + cros_ec_pwm: ec-pwm { + compatible = "google,cros-ec-pwm"; + #pwm-cells = <1>; + }; }; };
Signature · 1 line
2.20.1
Hello Rob,
Quoted 35 lines · Rob Herring
The example for the CrOS EC PWM is incomplete and now generates a dtc warning:
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.example.dts:17.11-23.11:
Warning (unit_address_vs_reg): /example-0/cros-ec@0: node has a unit name, but no reg or ranges propertyFixing this results in more warnings as a parent spi node is needed as well.
Cc Thierry Reding <[email protected]>Cc "Uwe Kleine-König" <[email protected]>Cc Benson Leung <[email protected]>Cc Enric Balletbo i Serra <[email protected]>Cc Guenter Roeck <[email protected]>Signed-off-by Rob Herring <[email protected]>--- .../bindings/pwm/google,cros-ec-pwm.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml +2
-5@@ -31,10 +31,17 @@ additionalProperties: false examples: - | - cros-ec@0 { - compatible = "google,cros-ec-spi"; - cros_ec_pwm: ec-pwm { - compatible = "google,cros-ec-pwm"; - #pwm-cells = <1>; + spi { + #address-cells = <1>;
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml additionalProperties: false · line 45
Quoted 10 lines
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml +10
-0+ #size-cells = <0>; + + cros-ec@0 { + compatible = "google,cros-ec-spi"; + reg = <0>; + + cros_ec_pwm: ec-pwm { + compatible = "google,cros-ec-pwm"; + #pwm-cells = <1>; + };
Looks reasonable
Is this supposed to go via the pwm tree, or do you apply yourself via a device-tree tree?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
Rob Herring
maintainerQuoted 52 lines · Uwe Kleine-König
Hello Rob,
Quoted 35 lines · Rob Herring
The example for the CrOS EC PWM is incomplete and now generates a dtc warning:
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.example.dts:17.11-23.11:
Warning (unit_address_vs_reg): /example-0/cros-ec@0: node has a unit name, but no reg or ranges propertyFixing this results in more warnings as a parent spi node is needed as well.
Cc Thierry Reding <[email protected]>Cc "Uwe Kleine-König" <[email protected]>Cc Benson Leung <[email protected]>Cc Enric Balletbo i Serra <enric.balletbo-ZGY8ohtN/[email protected]>Cc Guenter Roeck <[email protected]>Signed-off-by Rob Herring <[email protected]>--- .../bindings/pwm/google,cros-ec-pwm.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml +2
-5@@ -31,10 +31,17 @@ additionalProperties: false examples: - | - cros-ec@0 { - compatible = "google,cros-ec-spi"; - cros_ec_pwm: ec-pwm { - compatible = "google,cros-ec-pwm"; - #pwm-cells = <1>; + spi { + #address-cells = <1>;Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml additionalProperties: false · line 45
Quoted 10 lines
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml +10
-0+ #size-cells = <0>; + + cros-ec@0 { + compatible = "google,cros-ec-spi"; + reg = <0>; + + cros_ec_pwm: ec-pwm { + compatible = "google,cros-ec-pwm"; + #pwm-cells = <1>; + };Looks reasonable
Quoted 1 line
Acked-by Uwe Kleine-König <[email protected]>
Thanks.
Quoted 2 lines
Is this supposed to go via the pwm tree, or do you apply yourself via a device-tree tree?
I'll take it for rc2.
Rob