Skip to contentSkip to conversation

dt-bindings: hwmon: adm1272: add analog,temp1-enable binding

PATCH In review Chu Lin 1 participant 2 messages Jul 21, 2020 – May 4, 2021

Subsystems (2)
lore
Share & tools
lore

Chu Lin

author
#0 lore raw

PATCH v3 1/1 dt-bindings: hwmon: adm1272: add analog,temp1-enable binding

Problem:
adm1272 and adm1278 supports temperature sampling. The
current way of enabling it requires the user manually unbind the device from the driver, flip the temperature sampling control bit and then bind the device back to the driver. It would be nice if we can control this in a better way by reading the dt.

Solution:
Introducing device tree binding analog,temp1-enable. If the
flag is set, flip the temp1_en control bit on probing.

Testing:
make dt_binding_check

---
ChangeLog v1->v2:
- Rename adm1272-adm1278-temp1-en to analog-temperature1-enable

ChangeLog v2->v3:
- Rename analog-temperature1-enable analog,temp1-enable

 Documentation/devicetree/bindings/hwmon/adm1275.txt | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/hwmon/adm1275.txt +3 -0
index 1ecd03f3da4d..22ca5a321d5c 100644
@@ -15,6 +15,8 @@ Optional properties:
 
 - shunt-resistor-micro-ohms
 	Shunt resistor value in micro-Ohm
+- analog,temp1-enable
+	Enable temperature sampling. This is supported on adm1272 and adm1278
 
 Example:
 
@@ -22,4 +24,5 @@ adm1272@10 {
 	compatible = "adi,adm1272";
 	reg = <0x10>;
 	shunt-resistor-micro-ohms = <500>;
+	analog,temp1-enable;
 };
Signature · 1 line
2.28.0.rc0.105.gf9edc3c819-goog
author
#1 lore raw

Hi Rob,

Please review this device tree patch when you have a chance.

Thanks,
Chu

Quoted 48 lines · Chu Lin

Problem:
adm1272 and adm1278 supports temperature sampling. The
current way of enabling it requires the user manually unbind the device from the driver, flip the temperature sampling control bit and then bind the device back to the driver. It would be nice if we can control this in a better way by reading the dt.

Solution:
Introducing device tree binding analog,temp1-enable. If the
flag is set, flip the temp1_en control bit on probing.

Testing:
make dt_binding_check

---
ChangeLog v1->v2:
- Rename adm1272-adm1278-temp1-en to analog-temperature1-enable

ChangeLog v2->v3:
- Rename analog-temperature1-enable analog,temp1-enable

 Documentation/devicetree/bindings/hwmon/adm1275.txt | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/hwmon/adm1275.txt +3 -1
index 1ecd03f3da4d..22ca5a321d5c 100644
@@ -15,6 +15,8 @@ Optional properties:
 
 - shunt-resistor-micro-ohms
        Shunt resistor value in micro-Ohm
+- analog,temp1-enable
+       Enable temperature sampling. This is supported on adm1272 and adm1278
 
 Example:
 
@@ -22,4 +24,5 @@ adm1272@10 {
        compatible = "adi,adm1272";
        reg = <0x10>;
        shunt-resistor-micro-ohms = <500>;
+       analog,temp1-enable;
 };
--

2.28.0.rc0.105.gf9edc3c819-goog