Skip to content

Commit 371ed62

Browse files
frank-wdlezcano
authored andcommitted
thermal/drivers/mediatek: Fix control buffer enablement on MT7896
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 33140e6. Cc: [email protected] Fixes: 33140e6 ("thermal/drivers/mediatek: Control buffer enablement tweaks") Signed-off-by: Frank Wunderlich <[email protected]> Reviewed-by: Markus Schneider-Pargmann <[email protected]> Reviewed-by: Daniel Golle <[email protected]> Tested-by: Daniel Golle <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ca93bf6 commit 371ed62

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/thermal/mediatek/auxadc_thermal.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7986_thermal_data = {
690690
.adcpnp = mt7986_adcpnp,
691691
.sensor_mux_values = mt7986_mux_values,
692692
.version = MTK_THERMAL_V3,
693+
.apmixed_buffer_ctl_reg = APMIXED_SYS_TS_CON1,
694+
.apmixed_buffer_ctl_mask = GENMASK(31, 6) | BIT(3),
695+
.apmixed_buffer_ctl_set = BIT(0),
693696
};
694697

695698
static bool mtk_thermal_temp_is_valid(int temp)

0 commit comments

Comments
 (0)