[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240410-lvts_thermal-v1-1-ee50b29c1756@chromium.org>
Date: Wed, 10 Apr 2024 10:06:04 +0000
From: Hsin-Te Yuan <yuanhsinte@...omium.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
Lukasz Luba <lukasz.luba@....com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
NĂcolas F. R. A. Prado <nfraprado@...labora.com>,
Bernhard Rosenkränzer <bero@...libre.com>,
Balsam CHIHI <bchihi@...libre.com>
Cc: Alexandre Mergnat <amergnat@...libre.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, Hsin-Te Yuan <yuanhsinte@...omium.org>
Subject: [PATCH] thermal/drivers/mediatek/lvts_thermal: Add coeff for
mt8192
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@...omium.org>
---
drivers/thermal/mediatek/lvts_thermal.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index fd4bd650c77a6..6d226c3e135ca 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -80,6 +80,8 @@
#define LVTS_SENSOR_MAX 4
#define LVTS_GOLDEN_TEMP_MAX 62
#define LVTS_GOLDEN_TEMP_DEFAULT 50
+#define LVTS_COEFF_A_MT8192 -250460
+#define LVTS_COEFF_B_MT8192 250460
#define LVTS_COEFF_A_MT8195 -250460
#define LVTS_COEFF_B_MT8195 250460
#define LVTS_COEFF_A_MT7988 -204650
@@ -1530,11 +1532,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_MT8192,
+ .temp_offset = LVTS_COEFF_B_MT8192,
};
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_MT8192,
+ .temp_offset = LVTS_COEFF_B_MT8192,
};
static const struct lvts_data mt8195_lvts_mcu_data = {
---
base-commit: 20cb38a7af88dc40095da7c2c9094da3873fea23
change-id: 20240410-lvts_thermal-3d365847acff
Best regards,
--
Hsin-Te Yuan <yuanhsinte@...omium.org>
Powered by blists - more mailing lists