Skip to contentSkip to conversation

hwmon: ntc: fix iio raw to microvolts conversion

PATCH Guenter Roeck 1 participant 1 message Jun 2, 2015

lore
Share & tools
lore

Guenter Roeck

author Applied
#0 lore raw
Quoted 9 lines · Chris Lesiak

The function ntc_adc_iio_read was assuming both a 12 bit ADC and that pullup_uv is the same as the ADC reference voltage. If either assumption is false, then the result is incorrect.

Attempt to use iio_convert_raw_to_processed to convert the raw value to microvolts. It will fail for iio channels that don't support support IIO_CHAN_INFO_SCALE; in that case fall back to the assumptions.

Applied to -next.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors