Commit 62194e63 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Daniel Lezcano

thermal/drivers/mediatek/lvts_thermal: Move comment

Move efuse data interpretation inside lvts_golden_temp_init() alongside
the actual code retrieving wanted value.
Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20240402032729.2736685-3-nico@fluxnic.net
parent 8c25958f
...@@ -734,11 +734,15 @@ static int lvts_calibration_read(struct device *dev, struct lvts_domain *lvts_td ...@@ -734,11 +734,15 @@ static int lvts_calibration_read(struct device *dev, struct lvts_domain *lvts_td
return 0; return 0;
} }
static int lvts_golden_temp_init(struct device *dev, u32 *value, int temp_offset) static int lvts_golden_temp_init(struct device *dev, u8 *calib, int temp_offset)
{ {
u32 gt; u32 gt;
gt = (*value) >> 24; /*
* The golden temp information is contained in the 4th byte (index = 3)
* of efuse data.
*/
gt = calib[3];
if (gt && gt < LVTS_GOLDEN_TEMP_MAX) if (gt && gt < LVTS_GOLDEN_TEMP_MAX)
golden_temp = gt; golden_temp = gt;
...@@ -762,11 +766,7 @@ static int lvts_ctrl_init(struct device *dev, struct lvts_domain *lvts_td, ...@@ -762,11 +766,7 @@ static int lvts_ctrl_init(struct device *dev, struct lvts_domain *lvts_td,
if (ret) if (ret)
return ret; return ret;
/* ret = lvts_golden_temp_init(dev, lvts_td->calib, lvts_data->temp_offset);
* The golden temp information is contained in the first chunk
* of efuse data.
*/
ret = lvts_golden_temp_init(dev, (u32 *)lvts_td->calib, lvts_data->temp_offset);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment