Commit d69e7041 authored by Yangtao Li's avatar Yangtao Li Committed by Daniel Lezcano

thermal/drivers/sun8i: Convert to use macro

Use TEMP_CALIB_MASK macro instead of raw number.
Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230123102319.37710-1-frank.li@vivo.comSigned-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent f8887fdc
...@@ -210,7 +210,7 @@ static int sun8i_h3_ths_calibrate(struct ths_device *tmdev, ...@@ -210,7 +210,7 @@ static int sun8i_h3_ths_calibrate(struct ths_device *tmdev,
regmap_update_bits(tmdev->regmap, regmap_update_bits(tmdev->regmap,
SUN8I_THS_TEMP_CALIB + (4 * (i >> 1)), SUN8I_THS_TEMP_CALIB + (4 * (i >> 1)),
0xfff << offset, TEMP_CALIB_MASK << offset,
caldata[i] << offset); caldata[i] << offset);
} }
...@@ -271,7 +271,7 @@ static int sun50i_h6_ths_calibrate(struct ths_device *tmdev, ...@@ -271,7 +271,7 @@ static int sun50i_h6_ths_calibrate(struct ths_device *tmdev,
offset = (i % 2) * 16; offset = (i % 2) * 16;
regmap_update_bits(tmdev->regmap, regmap_update_bits(tmdev->regmap,
SUN50I_H6_THS_TEMP_CALIB + (i / 2 * 4), SUN50I_H6_THS_TEMP_CALIB + (i / 2 * 4),
0xfff << offset, TEMP_CALIB_MASK << offset,
cdata << offset); cdata << offset);
} }
......
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