Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <thierry.reding@gmail.com>
Cc: Benson Leung <bleung@chromium.org>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: linux-pwm@vger.kernel.org
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Rob Herring <robh@kernel.org>

+12 -5
+12 -5
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml
··· 31 31 32 32 examples: 33 33 - | 34 - cros-ec@0 { 35 - compatible = "google,cros-ec-spi"; 36 - cros_ec_pwm: ec-pwm { 37 - compatible = "google,cros-ec-pwm"; 38 - #pwm-cells = <1>; 34 + spi { 35 + #address-cells = <1>; 36 + #size-cells = <0>; 37 + 38 + cros-ec@0 { 39 + compatible = "google,cros-ec-spi"; 40 + reg = <0>; 41 + 42 + cros_ec_pwm: ec-pwm { 43 + compatible = "google,cros-ec-pwm"; 44 + #pwm-cells = <1>; 45 + }; 39 46 }; 40 47 };