Commit 207777dc authored by Claudiu Beznea's avatar Claudiu Beznea Committed by Jonathan Cameron

iio: adc: at91-sama5d2_adc: get rid of 5 degrees Celsius adjustment

On SAMA7G5 final chip version there is no need for 5 degrees Celsius
adjustment when computing junction temperature, thus, remove it.

Fixes: 5ab38b81 ("iio: adc: at91-sama5d2_adc: add support for temperature sensor")
Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20221020102705.3639204-1-claudiu.beznea@microchip.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent efa17e90
......@@ -2307,11 +2307,9 @@ static int at91_adc_temp_sensor_init(struct at91_adc_state *st,
clb->p6 = buf[AT91_ADC_TS_CLB_IDX_P6];
/*
* We prepare here the conversion to milli and also add constant
* factor (5 degrees Celsius) to p1 here to avoid doing it on
* hotpath.
* We prepare here the conversion to milli to avoid doing it on hotpath.
*/
clb->p1 = clb->p1 * 1000 + 5000;
clb->p1 = clb->p1 * 1000;
free_buf:
kfree(buf);
......
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