[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4771acd6-ecd3-b8e1-8605-75d78720b1d3@linaro.org>
Date: Fri, 17 Jul 2020 06:26:30 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Frank Lee <frank@...winnertech.com>, anarsoul@...il.com,
tiny.windzz@...il.com, rui.zhang@...el.com,
amit.kucheria@...durent.com, mripard@...nel.org, wens@...e.org,
linux-pm@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
huangshuosheng@...winnertech.com, liyong@...winnertech.com
Subject: Re: [PATCH v4 08/16] thermal: sun8i: add TEMP_CALIB_MASK for
calibration data in sun50i_h6_ths_calibrate
On 14/07/2020 09:13, Frank Lee wrote:
> From: Yangtao Li <frank@...winnertech.com>
>
> For sun50i_h6_ths_calibrate(), the data read from nvmem needs a round of
> calculation. On the other hand, the newer SOC may store other data in
> the space other than 12bit sensor data. Add mask operation to read data
> to avoid conversion error.
>
> Signed-off-by: Yangtao Li <frank@...winnertech.com>
> Reviewed-by: Yangtao Li <tiny.windzz@...il.com>
Can you clarify these SoB ?
Frank Lee==Yangtao Li==frank@...winnertech.com==tiny.windzz@...il.com ?
> ---
> drivers/thermal/sun8i_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
> index 74d73be16496..f423d44b9290 100644
> --- a/drivers/thermal/sun8i_thermal.c
> +++ b/drivers/thermal/sun8i_thermal.c
> @@ -244,7 +244,7 @@ static int sun50i_h6_ths_calibrate(struct ths_device *tmdev,
> ft_temp = (caldata[0] & FT_TEMP_MASK) * 100;
>
> for (i = 0; i < tmdev->chip->sensor_num; i++) {
> - int sensor_reg = caldata[i + 1];
> + int sensor_reg = caldata[i + 1] & TEMP_CALIB_MASK;
> int cdata, offset;
> int sensor_temp = tmdev->chip->calc_temp(tmdev, i, sensor_reg);
>
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Powered by blists - more mailing lists