Skip to content

Commit

Permalink
dt-bindings: pwm: Fix cros-ec-pwm example dtc 'reg' warning
Browse files Browse the repository at this point in the history
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: Benson Leung <[email protected]>
Cc: Enric Balletbo i Serra <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: [email protected]
Acked-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
  • Loading branch information
robherring committed Apr 15, 2020
1 parent 5fd274e commit c3a2079
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
};
};
};

0 comments on commit c3a2079

Please sign in to comment.