Skip to contentSkip to conversation

dt-bindings: mfd: Add regulator-compatible property

PATCH In review Naresh Solanki 2 participants 4 messages Jan 26, 2024 – Feb 2, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: mfd: Add regulator-compatible property

Add regulator-compatible property.
Also update example.

TEST=Run below command & make sure there is no error make DT_CHECKER_FLAGS=-m dt_binding_check

---
 Documentation/devicetree/bindings/mfd/maxim,max5970.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/mfd/maxim,max5970.yaml +9 -0
index 0da5cae3852e..75175098cbc2 100644
@@ -74,6 +74,9 @@ properties:
             description: |
               The value of current sense resistor in microohms.
 
+          regulator-compatible:
+            pattern: "^SW[0-1]$"
+
         required:
           - shunt-resistor-micro-ohms
 
@@ -111,6 +114,8 @@ examples:
 
             regulators {
                 sw0_ref_0: sw0 {
+                    regulator-compatible = "SW0";
+                    regulator-name = "p5v";
                     shunt-resistor-micro-ohms = <12000>;
                 };
             };
@@ -145,9 +150,13 @@ examples:
 
             regulators {
                 sw0_ref_1: sw0 {
+                    regulator-compatible = "SW0";
+                    regulator-name = "p5v_aux";
                     shunt-resistor-micro-ohms = <12000>;
                 };
                 sw1_ref_1: sw1 {
+                    regulator-compatible = "SW1";
+                    regulator-name = "p3v3_aux";
                     shunt-resistor-micro-ohms = <10000>;
                 };
             };

base-commit: ecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7

Signature · 1 line
2.42.0
#1 lore raw
Quoted 1 line · Naresh Solanki

Add regulator-compatible property.

Why? I can see that this is what you did, but there's no justification for it.

grepping for this property, the first thing I see is:
rg "regulator-compatible"
drivers/regulator/of_regulator.c
389: * based on either the deprecated property regulator-compatible if present,
428: "regulator-compatible", NULL);
486: name = of_get_property(child, "regulator-compatible", NULL);

The property is deprecated, so you'll need twice as good a justification for adding it!

Quoted 4 lines

Also update example.

TEST=Run below command & make sure there is no error make DT_CHECKER_FLAGS=-m dt_binding_check

Same comment here as my other mail.

Thanks,
Conor.

Quoted 48 lines
---
 Documentation/devicetree/bindings/mfd/maxim,max5970.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/mfd/maxim,max5970.yaml +9 -0
index 0da5cae3852e..75175098cbc2 100644
@@ -74,6 +74,9 @@ properties:
             description: |
               The value of current sense resistor in microohms.
 
+          regulator-compatible:
+            pattern: "^SW[0-1]$"
+
         required:
           - shunt-resistor-micro-ohms
 
@@ -111,6 +114,8 @@ examples:
 
             regulators {
                 sw0_ref_0: sw0 {
+                    regulator-compatible = "SW0";
+                    regulator-name = "p5v";
                     shunt-resistor-micro-ohms = <12000>;
                 };
             };
@@ -145,9 +150,13 @@ examples:
 
             regulators {
                 sw0_ref_1: sw0 {
+                    regulator-compatible = "SW0";
+                    regulator-name = "p5v_aux";
                     shunt-resistor-micro-ohms = <12000>;
                 };
                 sw1_ref_1: sw1 {
+                    regulator-compatible = "SW1";
+                    regulator-name = "p3v3_aux";
                     shunt-resistor-micro-ohms = <10000>;
                 };
             };

base-commit: ecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7

Signature · 1 line
2.42.0
#2 lore raw

Hi Conor,

Quoted 15 lines · Conor Dooley
Quoted 1 line · Naresh Solanki

Add regulator-compatible property.

Why? I can see that this is what you did, but there's no justification for it.

grepping for this property, the first thing I see is:
rg "regulator-compatible"
drivers/regulator/of_regulator.c
389: * based on either the deprecated property regulator-compatible if present,
428: "regulator-compatible", NULL);
486: name = of_get_property(child, "regulator-compatible", NULL);

Quoted 2 lines

The property is deprecated, so you'll need twice as good a justification for adding it!

Yes this is deprecated property. I missed noticing that earlier. Will remove this dependency. Thanks for pointing that out.

Regards,
Naresh

Quoted 59 lines
Quoted 5 lines

Also update example.

TEST=Run below command & make sure there is no error make DT_CHECKER_FLAGS=-m dt_binding_check

Same comment here as my other mail.

Thanks,
Conor.

Quoted 48 lines
---
 Documentation/devicetree/bindings/mfd/maxim,max5970.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/mfd/maxim,max5970.yaml +9 -0
index 0da5cae3852e..75175098cbc2 100644
@@ -74,6 +74,9 @@ properties:
             description: |
               The value of current sense resistor in microohms.
 
+          regulator-compatible:
+            pattern: "^SW[0-1]$"
+
         required:
           - shunt-resistor-micro-ohms
 
@@ -111,6 +114,8 @@ examples:
 
             regulators {
                 sw0_ref_0: sw0 {
+                    regulator-compatible = "SW0";
+                    regulator-name = "p5v";
                     shunt-resistor-micro-ohms = <12000>;
                 };
             };
@@ -145,9 +150,13 @@ examples:
 
             regulators {
                 sw0_ref_1: sw0 {
+                    regulator-compatible = "SW0";
+                    regulator-name = "p5v_aux";
                     shunt-resistor-micro-ohms = <12000>;
                 };
                 sw1_ref_1: sw1 {
+                    regulator-compatible = "SW1";
+                    regulator-name = "p3v3_aux";
                     shunt-resistor-micro-ohms = <10000>;
                 };
             };

base-commit: ecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7 --
2.42.0

#3 lore raw
Quoted 19 lines · Naresh Solanki

Hi Conor,

Quoted 15 lines · Conor Dooley
Quoted 1 line · Naresh Solanki

Add regulator-compatible property.

Why? I can see that this is what you did, but there's no justification for it.

grepping for this property, the first thing I see is:
rg "regulator-compatible"
drivers/regulator/of_regulator.c
389: * based on either the deprecated property regulator-compatible if present,
428: "regulator-compatible", NULL);
486: name = of_get_property(child, "regulator-compatible", NULL);

Quoted 4 lines
Quoted 2 lines

The property is deprecated, so you'll need twice as good a justification for adding it!

Yes this is deprecated property. I missed noticing that earlier. Will remove this dependency. Thanks for pointing that out.

What do you mean "remove this dependency"? If you remove this there is nothing useful left in the patch.

Confused,
Conor.

Quoted 62 lines

Regards,
Naresh

Quoted 59 lines
Quoted 5 lines

Also update example.

TEST=Run below command & make sure there is no error make DT_CHECKER_FLAGS=-m dt_binding_check

Same comment here as my other mail.

Thanks,
Conor.

Quoted 48 lines
---
 Documentation/devicetree/bindings/mfd/maxim,max5970.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)
Documentation/devicetree/bindings/mfd/maxim,max5970.yaml +9 -0
index 0da5cae3852e..75175098cbc2 100644
@@ -74,6 +74,9 @@ properties:
             description: |
               The value of current sense resistor in microohms.
 
+          regulator-compatible:
+            pattern: "^SW[0-1]$"
+
         required:
           - shunt-resistor-micro-ohms
 
@@ -111,6 +114,8 @@ examples:
 
             regulators {
                 sw0_ref_0: sw0 {
+                    regulator-compatible = "SW0";
+                    regulator-name = "p5v";
                     shunt-resistor-micro-ohms = <12000>;
                 };
             };
@@ -145,9 +150,13 @@ examples:
 
             regulators {
                 sw0_ref_1: sw0 {
+                    regulator-compatible = "SW0";
+                    regulator-name = "p5v_aux";
                     shunt-resistor-micro-ohms = <12000>;
                 };
                 sw1_ref_1: sw1 {
+                    regulator-compatible = "SW1";
+                    regulator-name = "p3v3_aux";
                     shunt-resistor-micro-ohms = <10000>;
                 };
             };

base-commit: ecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7 --
2.42.0