aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Wunderlich <[email protected]>2023-09-07 13:20:18 +0200
committerDaniel Lezcano <[email protected]>2024-03-11 17:14:46 +0100
commit371ed6263e2403068b359f0c07188548c2d70827 (patch)
tree245e364ee77a62693fc1849389ff62691ec64f6d
parentca93bf607a44c1f009283dac4af7df0d9ae5e357 (diff)
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 33140e668b10. Cc: [email protected] Fixes: 33140e668b10 ("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]
-rw-r--r--drivers/thermal/mediatek/auxadc_thermal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/thermal/mediatek/auxadc_thermal.c b/drivers/thermal/mediatek/auxadc_thermal.c
index 8b0edb204844..9ee2e7283435 100644
--- a/drivers/thermal/mediatek/auxadc_thermal.c
+++ b/drivers/thermal/mediatek/auxadc_thermal.c
@@ -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)