Skip to contentSkip to conversation

dt-bindings: hwmon: tda38640: Add interrupt & regulator properties

PATCH Superseded Naresh Solanki 2 participants 3 messages Jan 26, 2024 – Feb 14, 2024

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: hwmon: tda38640: Add interrupt & regulator properties

Add properties for interrupt & regulator.
Also update example.

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

---
 .../hwmon/pmbus/infineon,tda38640.yaml        | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +20 -0
index ded1c115764b..2df625a8b514 100644
@@ -30,6 +30,15 @@ properties:
       unconnected(has internal pull-down).
     type: boolean
 
+  interrupts:
+    maxItems: 1
+
+  regulators:
+    $ref: /schemas/regulator/regulator.yaml#
+    type: object
+    description: |
+      list of regulators provided by this controller.
+
 required:
   - compatible
   - reg
@@ -38,6 +47,7 @@ additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/interrupt-controller/irq.h>
     i2c {
         #address-cells = <1>;
         #size-cells = <0>;
@@ -45,5 +55,15 @@ examples:
         tda38640@40 {
             compatible = "infineon,tda38640";
             reg = <0x40>;
+
+            //interrupt-parent = <&smb_pex_cpu0_event>;
+            interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
+            regulators {
+                pvnn_main_cpu0: vout0 {
+                    regulator-compatible = "vout0";
+                    regulator-name = "pvnn_main_cpu0";
+                    regulator-enable-ramp-delay = <200>;
+                };
+            };
         };
     };

base-commit: ecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7

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

Add properties for interrupt & regulator.
Also update example.

Feeling like a broken record, given I am leaving the same comments on multiple patches. The commit message needs to explain why you're doing something. I can read the diff and see what you did!

Quoted 3 lines

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

Same comment here as elsewhere.

Quoted 11 lines
---
 .../hwmon/pmbus/infineon,tda38640.yaml        | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +0 -0
index ded1c115764b..2df625a8b514 100644

Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml properties: · line 39

Quoted 10 lines
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +7 -0
@@ -30,6 +30,15 @@ properties:
       unconnected(has internal pull-down).
     type: boolean
 
+  interrupts:
+    maxItems: 1
+
+  regulators:
+    $ref: /schemas/regulator/regulator.yaml#
+    type: object
+    description: |

The | here is not needed, there's no formatting to preserve.

From a quick check, most bindings with regulator subnodes restrict the subnode names with patternproperties. Is there a reason you have not?

Quoted 14 lines
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +3 -0
+      list of regulators provided by this controller.
+
 required:
   - compatible
   - reg
@@ -38,6 +47,7 @@ additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/interrupt-controller/irq.h>
     i2c {
         #address-cells = <1>;
         #size-cells = <0>;

Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml examples: · line 59

Quoted 5 lines
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +2 -0
@@ -45,5 +55,15 @@ examples:
         tda38640@40 {
             compatible = "infineon,tda38640";
             reg = <0x40>;
+
+            //interrupt-parent = <&smb_pex_cpu0_event>;

Why is this commented out? Please either restore it or remove it (with justification).

Thanks

Conor.

Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml examples: · line 60

Quoted 1 line
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +1 -0
+            interrupts = <10 IRQ_TYPE_LEVEL_LOW>;

Blank line here please.

Quoted 14 lines
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +7 -0
+            regulators {
+                pvnn_main_cpu0: vout0 {
+                    regulator-compatible = "vout0";
+                    regulator-name = "pvnn_main_cpu0";
+                    regulator-enable-ramp-delay = <200>;
+                };
+            };
         };
     };

base-commit: ecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7

Signature · 1 line
2.42.0
#2 lore raw

Hi,

Quoted 10 lines · Conor Dooley
Quoted 2 lines · Naresh Solanki

Add properties for interrupt & regulator.
Also update example.

Feeling like a broken record, given I am leaving the same comments on multiple patches. The commit message needs to explain why you're doing something. I can read the diff and see what you did!

Quoted 1 line
Quoted 4 lines
Quoted 2 lines

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

Same comment here as elsewhere.

Ack

Quoted 15 lines
Quoted 15 lines
---
 .../hwmon/pmbus/infineon,tda38640.yaml        | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +0 -0
index ded1c115764b..2df625a8b514 100644
@@ -30,6 +30,15 @@ properties:
       unconnected(has internal pull-down).
     type: boolean
 
Quoted 9 lines

Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml properties: · line 39

Quoted 7 lines
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +7 -0
+  interrupts:
+    maxItems: 1
+
+  regulators:
+    $ref: /schemas/regulator/regulator.yaml#
+    type: object
+    description: |

The | here is not needed, there's no formatting to preserve.

Ack

Quoted 3 lines

From a quick check, most bindings with regulator subnodes restrict the subnode names with patternproperties. Is there a reason you have not?

I have corrected it now & will push in next revision. regulators is expected to have subnode vout0. like below:
regulators:
type: object
description:
list of regulators provided by this controller.

properties:
vout0:
$ref: /schemas/regulator/regulator.yaml#
type: object

unevaluatedProperties: false

additionalProperties: false

Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +2 -0
+      list of regulators provided by this controller.
+
 required:
   - compatible
   - reg
@@ -38,6 +47,7 @@ additionalProperties: false
 
Quoted 15 lines

Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml examples: · line 59

Quoted 12 lines
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +3 -0
 examples:
   - |
+    #include <dt-bindings/interrupt-controller/irq.h>
     i2c {
         #address-cells = <1>;
         #size-cells = <0>;
@@ -45,5 +55,15 @@ examples:
         tda38640@40 {
             compatible = "infineon,tda38640";
             reg = <0x40>;
+
+            //interrupt-parent = <&smb_pex_cpu0_event>;

Why is this commented out? Please either restore it or remove it (with justification).

Ack. will restore it.

Quoted 8 lines

Thanks

Conor.

Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml examples: · line 60

Quoted 1 line
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +1 -0
+            interrupts = <10 IRQ_TYPE_LEVEL_LOW>;

Blank line here please.

Ack

Regards,
Naresh

Quoted 15 lines
Quoted 15 lines
Documentation/devicetree/bindings/hwmon/pmbus/infineon,tda38640.yaml +7 -0
+            regulators {
+                pvnn_main_cpu0: vout0 {
+                    regulator-compatible = "vout0";
+                    regulator-name = "pvnn_main_cpu0";
+                    regulator-enable-ramp-delay = <200>;
+                };
+            };
         };
     };

base-commit: ecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7 --
2.42.0