Skip to contentSkip to conversation

dt-bindings: pwm: Fix cros-ec-pwm example dtc 'reg' warning

PATCH In review Rob Herring 2 participants 3 messages Apr 15, 2020

Subsystems (3)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 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.

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]>
---
 .../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
index 24c217b76580..41ece1d85315 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw

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 property

Fixing 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]>
---
 .../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
index 24c217b76580..41ece1d85315 100644
@@ -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/ |
author maintainer
#2 lore raw
Quoted 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 property

Fixing 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]>
---
 .../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
index 24c217b76580..41ece1d85315 100644
@@ -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

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