Skip to content

Commit 207777d

Browse files
claudiubezneajic23
authored andcommitted
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: 5ab38b8 ("iio: adc: at91-sama5d2_adc: add support for temperature sensor") Signed-off-by: Claudiu Beznea <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent efa17e9 commit 207777d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/iio/adc/at91-sama5d2_adc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,11 +2307,9 @@ static int at91_adc_temp_sensor_init(struct at91_adc_state *st,
23072307
clb->p6 = buf[AT91_ADC_TS_CLB_IDX_P6];
23082308

23092309
/*
2310-
* We prepare here the conversion to milli and also add constant
2311-
* factor (5 degrees Celsius) to p1 here to avoid doing it on
2312-
* hotpath.
2310+
* We prepare here the conversion to milli to avoid doing it on hotpath.
23132311
*/
2314-
clb->p1 = clb->p1 * 1000 + 5000;
2312+
clb->p1 = clb->p1 * 1000;
23152313

23162314
free_buf:
23172315
kfree(buf);

0 commit comments

Comments
 (0)