From: David Lechner <dlechner@baylibre.com>
To: "Pop Ioan Daniel" <pop.ioan-daniel@analog.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Sergiu Cuciurean" <sergiu.cuciurean@analog.com>,
"Dragos Bogdan" <dragos.bogdan@analog.com>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"Olivier Moysan" <olivier.moysan@foss.st.com>,
"Javier Carrasco" <javier.carrasco.cruz@gmail.com>,
"Matti Vaittinen" <mazziesaccount@gmail.com>,
"Tobias Sperling" <tobias.sperling@softing.com>,
"Marcelo Schmitt" <marcelo.schmitt@analog.com>,
"Alisa-Dariana Roman" <alisadariana@gmail.com>,
"João Paulo Gonçalves" <joao.goncalves@toradex.com>,
"Herve Codina" <herve.codina@bootlin.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/4] iio: backend: update iio_backend_oversampling_ratio_set
Date: Fri, 16 May 2025 10:06:18 -0500 [thread overview]
Message-ID: <8e5a9176-1652-41a5-bb8c-cea0d44e4d2d@baylibre.com> (raw)
In-Reply-To: <20250516105810.3028541-2-pop.ioan-daniel@analog.com>
On 5/16/25 5:58 AM, Pop Ioan Daniel wrote:
> In the function iio_backend_oversampling_ratio_set the chan parameter
> was added. The function can be used in contexts where the channel
> must be specified. All affected files have been modified.
>
> Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
> ---
> changes in v3:
> - fix ad4851_set_oversampling_ratio function channel error
> drivers/iio/adc/ad4851.c | 6 +++---
> drivers/iio/adc/adi-axi-adc.c | 3 ++-
> drivers/iio/industrialio-backend.c | 3 ++-
> include/linux/iio/backend.h | 3 ++-
> 4 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/iio/adc/ad4851.c b/drivers/iio/adc/ad4851.c
> index 98ebc853db79..fccfca256670 100644
> --- a/drivers/iio/adc/ad4851.c
> +++ b/drivers/iio/adc/ad4851.c
> @@ -294,7 +294,7 @@ static int ad4851_scale_fill(struct iio_dev *indio_dev)
> }
>
> static int ad4851_set_oversampling_ratio(struct iio_dev *indio_dev,
> - const struct iio_chan_spec *chan,
> + unsigned int chan,
I think passing the channel here is misleading since this is setting the
oversampling ratio for all channels, not just the one specified.
I would suggest to make a separate patch that removes the unused
const struct iio_chan_spec *chan parameter first.
> unsigned int osr)
> {
> struct ad4851_state *st = iio_priv(indio_dev);
> @@ -321,7 +321,7 @@ static int ad4851_set_oversampling_ratio(struct iio_dev *indio_dev,
> return ret;
> }
>
> - ret = iio_backend_oversampling_ratio_set(st->back, osr);
> + ret = iio_backend_oversampling_ratio_set(st->back, chan, osr);
Then in this patch, just pass 0 here instead of chan with a comment that
the channel is ignored by the backend being used here.
> if (ret)
> return ret;
>
next prev parent reply other threads:[~2025-05-16 15:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 10:58 [PATCH v3 0/4] Add support for AD7405/ADUM770x Pop Ioan Daniel
2025-05-16 10:58 ` [PATCH v3 1/4] iio: backend: update iio_backend_oversampling_ratio_set Pop Ioan Daniel
2025-05-16 15:06 ` David Lechner [this message]
2025-05-18 16:13 ` Jonathan Cameron
2025-05-16 10:58 ` [PATCH v3 2/4] iio: adc: adi-axi-adc: add axi_adc_oversampling_ratio_set Pop Ioan Daniel
2025-05-16 15:06 ` David Lechner
2025-05-16 10:58 ` [PATCH v3 3/4] dt-bindings: iio: adc: add ad7405 Pop Ioan Daniel
2025-05-16 14:18 ` Conor Dooley
2025-05-16 15:45 ` David Lechner
2025-05-16 19:30 ` Krzysztof Kozlowski
2025-05-18 16:44 ` Jonathan Cameron
2025-05-16 10:58 ` [PATCH v3 4/4] iio: adc: ad7405: add ad7405 driver Pop Ioan Daniel
2025-05-16 15:08 ` David Lechner
2025-05-18 16:33 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8e5a9176-1652-41a5-bb8c-cea0d44e4d2d@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Michael.Hennerich@analog.com \
--cc=alisadariana@gmail.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dragos.bogdan@analog.com \
--cc=herve.codina@bootlin.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=jic23@kernel.org \
--cc=joao.goncalves@toradex.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=mazziesaccount@gmail.com \
--cc=nuno.sa@analog.com \
--cc=olivier.moysan@foss.st.com \
--cc=pop.ioan-daniel@analog.com \
--cc=robh@kernel.org \
--cc=sergiu.cuciurean@analog.com \
--cc=tobias.sperling@softing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox