thermal/drivers/mediatek: Fix control buffer enablement on MT7896
Subsystems (3)
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.
--- drivers/thermal/mediatek/auxadc_thermal.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/thermal/mediatek/auxadc_thermal.c +3 -0
@@ -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
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_datastruct which were used inmtk_thermal_turn_on_bufferafter commit33140e668b10.Fixes 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")Signed-off-by Frank Wunderlich <[email protected]>
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_datastruct which were used inmtk_thermal_turn_on_bufferafter commit33140e668b10.Fixes 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")Signed-off-by Frank Wunderlich <[email protected]>
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@@ -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
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_datastruct which were used inmtk_thermal_turn_on_bufferafter commit33140e668b10.Fixes 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")Signed-off-by Frank Wunderlich <[email protected]>Reviewed-by Markus Schneider-Pargmann <[email protected]>
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,
MarkusQuoted 26 lines
--- drivers/thermal/mediatek/auxadc_thermal.c | 3 +++ 1 file changed, 3 insertions(+)drivers/thermal/mediatek/auxadc_thermal.c +3
-0@@ -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
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
-274000Fix this by adding missing members in
mtk_thermal_datastruct which were used inmtk_thermal_turn_on_bufferafter commit33140e668b10.Fixes 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")Signed-off-by Frank Wunderlich <[email protected]>
Quoted 6 lines
Quoted 1 line
Reviewed-by Markus Schneider-Pargmann <[email protected]>Reviewed-by Daniel Golle <[email protected]>Tested-by Daniel Golle <[email protected]>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