thermal/drivers/mediatek/lvts_thermal: Add coeff for mt8192
authorHsin-Te Yuan <yuanhsinte@chromium.org>
Tue, 16 Apr 2024 07:35:47 +0000 (07:35 +0000)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 23 Apr 2024 10:40:29 +0000 (12:40 +0200)
In order for lvts_raw_to_temp to function properly on mt8192,
temperature coefficients for mt8192 need to be added.

Fixes: 288732242db4 ("thermal/drivers/mediatek/lvts_thermal: Add mt8192 support")
Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20240416-lvts_thermal-v2-1-f8a36882cc53@chromium.org
drivers/thermal/mediatek/lvts_thermal.c

index fd4bd650c77a6ae8a0deebb7d8cfb13415d9214e..4e5c213a892254f08c3c7f575e4a0ebde2c81354 100644 (file)
@@ -1530,11 +1530,15 @@ static const struct lvts_data mt7988_lvts_ap_data = {
 static const struct lvts_data mt8192_lvts_mcu_data = {
        .lvts_ctrl      = mt8192_lvts_mcu_data_ctrl,
        .num_lvts_ctrl  = ARRAY_SIZE(mt8192_lvts_mcu_data_ctrl),
+       .temp_factor    = LVTS_COEFF_A_MT8195,
+       .temp_offset    = LVTS_COEFF_B_MT8195,
 };
 
 static const struct lvts_data mt8192_lvts_ap_data = {
        .lvts_ctrl      = mt8192_lvts_ap_data_ctrl,
        .num_lvts_ctrl  = ARRAY_SIZE(mt8192_lvts_ap_data_ctrl),
+       .temp_factor    = LVTS_COEFF_A_MT8195,
+       .temp_offset    = LVTS_COEFF_B_MT8195,
 };
 
 static const struct lvts_data mt8195_lvts_mcu_data = {