diff options
author | David Lechner <dlechner@baylibre.com> | 2025-04-02 18:55:58 -0500 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-04-07 19:32:50 +0100 |
commit | 2d7b60f33da324abe7824037b4829ff7df70e435 (patch) | |
tree | 8e8418e1c17bc66dd3bf33676a00fdfb74e0f494 /lib/net_utils.c | |
parent | 79dabbd505210e41c88060806c92c052496dd61c (diff) |
iio: adc: ad7380: fix event threshold shift
Add required bit shift to the event threshold read function to get
correct scaling.
When alert support was added, the write function correctly included the
required shift needed to convert the threshold register value to the
same scale as the raw ADC value. However, the shift got missed in the
read function.
Fixes: 27d1a4dbe1e1 ("iio: adc: ad7380: add alert support")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20250402-iio-adc-ad7380-fix-event-threshold-shift-v1-1-ad4975c296b2@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'lib/net_utils.c')
0 files changed, 0 insertions, 0 deletions