linux-stable/drivers/iio/addac
Rasmus Villemoes 24febc99ca iio: addac: ad74413: fix resistance input processing
On success, ad74413r_get_single_adc_result() returns IIO_VAL_INT aka
1. So currently, the IIO_CHAN_INFO_PROCESSED case is effectively
equivalent to the IIO_CHAN_INFO_RAW case, and we never call
ad74413r_adc_to_resistance_result() to convert the adc measurement to
ohms.

Check ret for being negative rather than non-zero.

Fixes: fea251b6a5 (iio: addac: add AD74413R driver)
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20230503095817.452551-1-linux@rasmusvillemoes.dk
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2023-05-13 17:54:58 +01:00
..
ad74115.c iio: addac: ad74115: remove unused ad74115_dac_slew_rate_hz_tbl 2022-11-24 19:23:57 +00:00
ad74413r.c iio: addac: ad74413: fix resistance input processing 2023-05-13 17:54:58 +01:00
Kconfig iio: addac: stx104: Migrate to the regmap API 2023-04-10 12:26:34 +01:00
Makefile iio: addac: add AD74115 driver 2022-11-23 20:49:00 +00:00
stx104.c iio: addac: stx104: Use regmap_read_poll_timeout() for conversion poll 2023-04-10 12:26:34 +01:00