From: Nicolas Pitre Date: Tue, 2 Apr 2024 03:25:35 +0000 (-0400) Subject: thermal/drivers/mediatek/lvts_thermal: Retrieve all calibration bytes X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8c25958f71d8c173b81cb422a44c5743beb76af7;p=linux.git thermal/drivers/mediatek/lvts_thermal: Retrieve all calibration bytes Calibration values are 24-bit wide. Those values so far appear to span only 16 bits but let's not push our luck. Found while looking at the original Mediatek driver code. Signed-off-by: Nicolas Pitre Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20240402032729.2736685-2-nico@fluxnic.net --- diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 4e5c213a89225..d26662608b4c6 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -679,7 +679,7 @@ static int lvts_calibration_init(struct device *dev, struct lvts_ctrl *lvts_ctrl for (i = 0; i < lvts_ctrl_data->num_lvts_sensor; i++) memcpy(&lvts_ctrl->calibration[i], - efuse_calibration + lvts_ctrl_data->cal_offset[i], 2); + efuse_calibration + lvts_ctrl_data->cal_offset[i], 3); return 0; }