dt-bindings: regulator: update fixed-regulator example

Message ID 20190208140425.12917-1-johan@kernel.org
State Not Applicable
Headers show
Series
  • dt-bindings: regulator: update fixed-regulator example
Related show

Checks

Context Check Description
robh/checkpatch success

Commit Message

Johan Hovold Feb. 8, 2019, 2:04 p.m.
Fixed regulators do not have associated bus addresses and are typically
placed directly under the root node where their names must still be
unique despite not having a unit address.

Fix the malformed example node which had a unit address but no "reg"
property by dropping the unit address.

Also, try to make the example more useful by using the recommended
generic node name "regulator", but with a suffix reflecting the
regulator name in order to make it unique.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 .../devicetree/bindings/regulator/fixed-regulator.yaml        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Rob Herring Feb. 11, 2019, 5:36 p.m. | #1
On Fri, Feb 8, 2019 at 8:05 AM Johan Hovold <johan@kernel.org> wrote:
>
> Fixed regulators do not have associated bus addresses and are typically
> placed directly under the root node where their names must still be
> unique despite not having a unit address.
>
> Fix the malformed example node which had a unit address but no "reg"
> property by dropping the unit address.
>
> Also, try to make the example more useful by using the recommended
> generic node name "regulator", but with a suffix reflecting the
> regulator name in order to make it unique.
>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
>  .../devicetree/bindings/regulator/fixed-regulator.yaml        | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>

Patch

diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
index a7607b0baab7..d289c2f7455a 100644
--- a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
@@ -52,9 +52,9 @@  required:
 
 examples:
   - |
-    abc: fixedregulator@0 {
+    reg_1v8: regulator-1v8 {
       compatible = "regulator-fixed";
-      regulator-name = "fixed-supply";
+      regulator-name = "1v8";
       regulator-min-microvolt = <1800000>;
       regulator-max-microvolt = <1800000>;
       gpio = <&gpio1 16 0>;