aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorLinus Walleij <[email protected]>2021-03-08 11:02:19 +0100
committerJonathan Cameron <[email protected]>2021-03-25 19:13:51 +0000
commit4f2d9cced4c1ccda7ca0c888892954361c8a397e (patch)
tree37ec102b1f2aa8d1e1ac4df94b541eb1bfff360f /tools/perf/scripts/python
parent635ef601b2387c3215252c9931786524d122c0e7 (diff)
hwmon: (ntc_thermistor): try reading processed
Before trying the custom method of reading the sensor as raw and then converting, we want to use iio_read_channel_processed_scale() which first tries to see if the ADC can provide a processed value directly, else reads raw and applies scaling inside of IIO using the scale attributes of the ADC. We need to multiply the scaled value with 1000 to get to microvolts from millivolts which is what processed IIO channels returns. Keep the code that assumes 12bit ADC around as a fallback. This gives correct readings on the AB8500 thermistor inputs used in the Ux500 HREFP520 platform for reading battery and board temperature. Cc: Peter Rosin <[email protected]> Cc: Chris Lesiak <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/linux-iio/[email protected]/ Signed-off-by: Linus Walleij <[email protected]> Tested-by: Chris Lesiak <[email protected]> Acked-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions