[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241025095939.271811-2-aardelean@baylibre.com>
Date: Fri, 25 Oct 2024 12:59:35 +0300
From: Alexandru Ardelean <aardelean@...libre.com>
To: linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Cc: jic23@...nel.org,
krzk+dt@...nel.org,
robh@...nel.org,
lars@...afoo.de,
michael.hennerich@...log.com,
gstols@...libre.com,
dlechner@...libre.com,
conor.dooley@...rochip.com,
Alexandru Ardelean <aardelean@...libre.com>
Subject: [PATCH v2 1/5] iio: adc: ad7606: fix/persist oversampling_ratio setting
When the mutexes were reworked to guards, the caching of the
oversampling_ratio values was removed by accident.
The main effect of this change is that, after setting the
oversampling_ratio value, reading it back would result in the initial value
(of 1).
The value would get sent to the device correctly though.
Fixes 2956979dbd0d: ("iio: adc: ad7606: switch mutexes to guard")
Signed-off-by: Alexandru Ardelean <aardelean@...libre.com>
---
drivers/iio/adc/ad7606.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c
index 0e830a17fc19..ae49f4ba50d9 100644
--- a/drivers/iio/adc/ad7606.c
+++ b/drivers/iio/adc/ad7606.c
@@ -753,6 +753,7 @@ static int ad7606_write_raw(struct iio_dev *indio_dev,
ret = st->write_os(indio_dev, i);
if (ret < 0)
return ret;
+ st->oversampling = st->oversampling_avail[i];
return 0;
case IIO_CHAN_INFO_SAMP_FREQ:
--
2.46.1
Powered by blists - more mailing lists