Skip to contentSkip to conversation

dt-bindings: thermal: allow more resets for tsadc node in rockchip-thermal.yaml

RFC PATCH Superseded Johan Jonker 2 participants 6 messages Sep 6, 2021 – Sep 20, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/4 dt-bindings: thermal: allow more resets for tsadc node in rockchip-thermal.yaml

The tsadc node in rk356x.dtsi has more resets defined then currently allowed by rockchip-thermal.yaml, so fix that in the documentation. The driver now uses the devm_reset_control_array_get() function, so reset-names is no longer required, but keep it for legacy reasons.

---
 .../devicetree/bindings/thermal/rockchip-thermal.yaml     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml +6 -2
index b96ea277b..ee104e451 100644
@@ -37,11 +37,16 @@ properties:
       - const: apb_pclk
 
   resets:
-    maxItems: 1
+    minItems: 1
+    maxItems: 3
 
   reset-names:
+    deprecated: true
+    minItems: 1
     items:
       - const: tsadc-apb
+      - const: tsadc
+      - const: tsadc-phy
 
   "#thermal-sensor-cells":
     const: 1
@@ -71,7 +76,6 @@ required:
   - clocks
   - clock-names
   - resets
-  - reset-names
   - "#thermal-sensor-cells"
 
 additionalProperties: false
Signature · 1 line
2.20.1
#1 lore raw

RFC PATCH 2/4 dt-bindings: thermal: remove redundant comments from rockchip-thermal.yaml

Remove redundent comments from rockchip-thermal.yaml Sort compatibles in alphabetical order.

---
 .../bindings/thermal/rockchip-thermal.yaml       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml +8 -8
index ee104e451..6ea6c9f7e 100644
@@ -12,14 +12,14 @@ maintainers:
 properties:
   compatible:
     enum:
-      - rockchip,px30-tsadc # PX30 SoCs
-      - rockchip,rv1108-tsadc # RV1108 SoCs
-      - rockchip,rk3228-tsadc # RK3228 SoCs
-      - rockchip,rk3288-tsadc # RK3288 SoCs
-      - rockchip,rk3328-tsadc # RK3328 SoCs
-      - rockchip,rk3368-tsadc # RK3368 SoCs
-      - rockchip,rk3399-tsadc # RK3399 SoCs
-      - rockchip,rk3568-tsadc # RK3568 SoCs
+      - rockchip,px30-tsadc
+      - rockchip,rk3228-tsadc
+      - rockchip,rk3288-tsadc
+      - rockchip,rk3328-tsadc
+      - rockchip,rk3368-tsadc
+      - rockchip,rk3399-tsadc
+      - rockchip,rk3568-tsadc
+      - rockchip,rv1108-tsadc
 
   reg:
     maxItems: 1
Signature · 1 line
2.20.1
maintainer Reviewed-by on v1 2/4
#2 lore raw

Re: [RFC PATCH 2/4] dt-bindings: thermal: remove redundant comments from rockchip-thermal.yaml

Quoted 8 lines · Johan Jonker

Remove redundent comments from rockchip-thermal.yaml Sort compatibles in alphabetical order.

---
 .../bindings/thermal/rockchip-thermal.yaml       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#3 lore raw

RFC PATCH 3/4 thermal: rockchip_thermal: allow more resets for tsadc node

In reply to Johan Jonker

The tsadc node in rk356x.dtsi has more resets then currently supported by the rockchip_thermal.c driver, so use devm_reset_control_array_get() to reset them all.

---
 drivers/thermal/rockchip_thermal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/rockchip_thermal.c +1 -1
index 657d84b99..dc3a9c276 100644
@@ -1383,7 +1383,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
 	if (IS_ERR(thermal->regs))
 		return PTR_ERR(thermal->regs);
 
-	thermal->reset = devm_reset_control_get(&pdev->dev, "tsadc-apb");
+	thermal->reset = devm_reset_control_array_get(&pdev->dev, false, false);
 	if (IS_ERR(thermal->reset)) {
 		error = PTR_ERR(thermal->reset);
 		dev_err(&pdev->dev, "failed to get tsadc reset: %d\n", error);
Signature · 1 line
2.20.1
#4 lore raw

RFC PATCH 4/4 arm64: dts: fix resets in tsadc node for rk356x.dtsi

In reply to Johan Jonker

In the rockchip_thermal.c driver we now get the resets with a devm_reset_control_array_get() function, so remove the reset-names property as it is no longer needed. Although no longer required in rockchip-thermal.yaml sort tsadc-apb as first item.

---
 arch/arm64/boot/dts/rockchip/rk356x.dtsi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk356x.dtsi +1 -2
index d89831bee..2dc997eff 100644
@@ -837,9 +837,8 @@
 		assigned-clock-rates = <17000000>, <700000>;
 		clocks = <&cru CLK_TSADC>, <&cru PCLK_TSADC>;
 		clock-names = "tsadc", "apb_pclk";
-		resets = <&cru SRST_TSADC>, <&cru SRST_P_TSADC>,
+		resets = <&cru SRST_P_TSADC>, <&cru SRST_TSADC>,
 			 <&cru SRST_TSADCPHY>;
-		reset-names = "tsadc", "tsadc-apb", "tsadc-phy";
 		rockchip,grf = <&grf>;
 		rockchip,hw-tshut-temp = <95000>;
 		pinctrl-names = "init", "default", "sleep";
Signature · 1 line
2.20.1
maintainer
#5 lore raw
In reply to Johan Jonker
Quoted 4 lines · Johan Jonker

The tsadc node in rk356x.dtsi has more resets defined then currently allowed by rockchip-thermal.yaml, so fix that in the documentation. The driver now uses the devm_reset_control_array_get() function, so reset-names is no longer required, but keep it for legacy reasons.

I don't think I'd deprecate it for that reason.

And removing it would break any kernel before the
devm_reset_control_array_get change.

Quoted 40 lines
---
 .../devicetree/bindings/thermal/rockchip-thermal.yaml     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml +6 -2
index b96ea277b..ee104e451 100644
@@ -37,11 +37,16 @@ properties:
       - const: apb_pclk
 
   resets:
-    maxItems: 1
+    minItems: 1
+    maxItems: 3
 
   reset-names:
+    deprecated: true
+    minItems: 1
     items:
       - const: tsadc-apb
+      - const: tsadc
+      - const: tsadc-phy
 
   "#thermal-sensor-cells":
     const: 1
@@ -71,7 +76,6 @@ required:
   - clocks
   - clock-names
   - resets
-  - reset-names
   - "#thermal-sensor-cells"
 
 additionalProperties: false
Signature · 1 line
2.20.1

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip