Skip to contentSkip to conversation

thermal/drivers/mediatek: Fix control buffer enablement on MT7896

PATCH In review Frank Wunderlich 5 participants 5 messages Sep 7, 2023 – Jan 31, 2024

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

PATCH 1/1 thermal/drivers/mediatek: Fix control buffer enablement on MT7896

From: Frank Wunderlich <[email protected]>

Reading thermal sensor on mt7986 devices returns invalid temperature:

bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp
-274000

Fix this by adding missing members in mtk_thermal_data struct which were used in mtk_thermal_turn_on_buffer after commit 33140e668b10.

Fixes 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")
---
 drivers/thermal/mediatek/auxadc_thermal.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/thermal/mediatek/auxadc_thermal.c +3 -0
index 843214d30bd8..967b9a1aead4 100644
@@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7986_thermal_data = {
 	.adcpnp = mt7986_adcpnp,
 	.sensor_mux_values = mt7986_mux_values,
 	.version = MTK_THERMAL_V3,
+	.apmixed_buffer_ctl_reg = APMIXED_SYS_TS_CON1,
+	.apmixed_buffer_ctl_mask = GENMASK(31, 6) | BIT(3),
+	.apmixed_buffer_ctl_set = BIT(0),
 };
 
 static bool mtk_thermal_temp_is_valid(int temp)
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Il 07/09/23 13:20, Frank Wunderlich ha scritto:

Quoted 7 lines

From: Frank Wunderlich <[email protected]>

Reading thermal sensor on mt7986 devices returns invalid temperature:

bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp
-274000

Quoted 6 lines

Fix this by adding missing members in mtk_thermal_data struct which were used in mtk_thermal_turn_on_buffer after commit 33140e668b10.

Fixes 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")
Reviewed-by on v1 1/1
#2 lore raw
In reply to Frank Wunderlich
Quoted 7 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Reading thermal sensor on mt7986 devices returns invalid temperature:

bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp
-274000

Quoted 6 lines

Fix this by adding missing members in mtk_thermal_data struct which were used in mtk_thermal_turn_on_buffer after commit 33140e668b10.

Fixes 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")

Thanks for fixing!

Best,
Markus

Quoted 26 lines
---
 drivers/thermal/mediatek/auxadc_thermal.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/thermal/mediatek/auxadc_thermal.c +3 -0
index 843214d30bd8..967b9a1aead4 100644
@@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7986_thermal_data = {
 	.adcpnp = mt7986_adcpnp,
 	.sensor_mux_values = mt7986_mux_values,
 	.version = MTK_THERMAL_V3,
+	.apmixed_buffer_ctl_reg = APMIXED_SYS_TS_CON1,
+	.apmixed_buffer_ctl_mask = GENMASK(31, 6) | BIT(3),
+	.apmixed_buffer_ctl_set = BIT(0),
 };
 
 static bool mtk_thermal_temp_is_valid(int temp)
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by Tested-by
#3 lore raw

Hi everyone!

Quoted 8 lines · Markus Schneider-Pargmann
Quoted 7 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Reading thermal sensor on mt7986 devices returns invalid temperature:

bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp
-274000

Quoted 8 lines
Quoted 6 lines

Fix this by adding missing members in mtk_thermal_data struct which were used in mtk_thermal_turn_on_buffer after commit 33140e668b10.

Fixes 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")

Kind ping to thermal and mediatek maintainers, please merge this patch.

https://patchwork.kernel.org/project/linux-pm/patch/[email protected]/

https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/

Quoted 33 lines

Thanks for fixing!

Best,
Markus

Quoted 26 lines
---
 drivers/thermal/mediatek/auxadc_thermal.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/thermal/mediatek/auxadc_thermal.c +3 -0
index 843214d30bd8..967b9a1aead4 100644
@@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7986_thermal_data = {
 	.adcpnp = mt7986_adcpnp,
 	.sensor_mux_values = mt7986_mux_values,
 	.version = MTK_THERMAL_V3,
+	.apmixed_buffer_ctl_reg = APMIXED_SYS_TS_CON1,
+	.apmixed_buffer_ctl_mask = GENMASK(31, 6) | BIT(3),
+	.apmixed_buffer_ctl_set = BIT(0),
 };
 
 static bool mtk_thermal_temp_is_valid(int temp)
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw
Quoted 18 lines · Daniel Golle

Hi everyone!

Quoted 15 lines · Markus Schneider-Pargmann
Quoted 13 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Reading thermal sensor on mt7986 devices returns invalid temperature:

bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp
-274000

Fix this by adding missing members in mtk_thermal_data struct which were used in mtk_thermal_turn_on_buffer after commit 33140e668b10.

Fixes 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")
Quoted 6 lines
Quoted 1 line

Kind ping to thermal and mediatek maintainers, please merge this patch.

Applied with master pong

Thanks!

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog