Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal/drivers/mediatek: Fix bank number settings on mt8183

MT8183_NUM_ZONES should be set to 1
because MT8183 doesn't have multiple banks.

Fixes: a4ffe6b52d27 ("thermal: mediatek: add support for MT8183")
Signed-off-by: Michael Kao <michael.kao@mediatek.com>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200323121537.22697-6-michael.kao@mediatek.com

authored by

Michael Kao and committed by
Daniel Lezcano
14533a5a b45fd13b

+4 -1
+4 -1
drivers/thermal/mtk_thermal.c
··· 211 211 /* The total number of temperature sensors in the MT8183 */ 212 212 #define MT8183_NUM_SENSORS 6 213 213 214 + /* The number of banks in the MT8183 */ 215 + #define MT8183_NUM_ZONES 1 216 + 214 217 /* The number of sensing points per bank */ 215 218 #define MT8183_NUM_SENSORS_PER_ZONE 6 216 219 ··· 500 497 */ 501 498 static const struct mtk_thermal_data mt8183_thermal_data = { 502 499 .auxadc_channel = MT8183_TEMP_AUXADC_CHANNEL, 503 - .num_banks = MT8183_NUM_SENSORS_PER_ZONE, 500 + .num_banks = MT8183_NUM_ZONES, 504 501 .num_sensors = MT8183_NUM_SENSORS, 505 502 .vts_index = mt8183_vts_index, 506 503 .cali_val = MT8183_CALIBRATION,