diff options
author | Dumitru Ceclan <dumitru.ceclan@analog.com> | 2024-05-30 14:07:52 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-06-03 20:05:19 +0200 |
commit | 18befe4a28403f599115c5ae753cc7f5157af8b7 (patch) | |
tree | a07b6e17391d50419df33af75bd7963705bc4f80 /drivers | |
parent | iio: imu: inv_icm42600: delete unneeded update watermark call (diff) | |
download | linux-18befe4a28403f599115c5ae753cc7f5157af8b7.tar.xz linux-18befe4a28403f599115c5ae753cc7f5157af8b7.zip |
iio: adc: ad7173: Clear append status bit
The previous value of the append status bit was not cleared before
setting the new value. This caused the bit to remain set after enabling
buffered mode for multiple channels and not permit further buffered
reads from a single channel after the fact.
Fixes: 76a1e6a42802 ("iio: adc: ad7173: add AD7173 driver")
Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Link: https://lore.kernel.org/r/20240530-ad7173-fixes-v3-4-b85f33079e18@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/adc/ad7173.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c index 048127bf979a..e2f17292409c 100644 --- a/drivers/iio/adc/ad7173.c +++ b/drivers/iio/adc/ad7173.c @@ -543,6 +543,7 @@ static int ad7173_append_status(struct ad_sigma_delta *sd, bool append) unsigned int interface_mode = st->interface_mode; int ret; + interface_mode &= ~AD7173_INTERFACE_DATA_STAT; interface_mode |= AD7173_INTERFACE_DATA_STAT_EN(append); ret = ad_sd_write_reg(&st->sd, AD7173_REG_INTERFACE_MODE, 2, interface_mode); if (ret) |