From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ad_sigma_delta: change to buffer predisable
Date: Sun, 6 Jul 2025 11:34:07 +0100 [thread overview]
Message-ID: <20250706113407.206682e7@jic23-huawei> (raw)
In-Reply-To: <1a0d8f22dc540567142e4583db6eaea0e7d06f99.camel@gmail.com>
On Fri, 04 Jul 2025 13:43:59 +0100
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Thu, 2025-07-03 at 16:07 -0500, David Lechner wrote:
> > Change the buffer disable callback from postdisable to predisable.
> > This balances the existing posteanble callback. Using postdisable
> > with posteanble can be problematic, for example, if update_scan_mode
> > fails, it would call postdisable without ever having called posteanble,
> > so the drivers using this would be in an unexpected state when
> > postdisable was called.
> >
> > Fixes: af3008485ea0 ("iio:adc: Add common code for ADI Sigma Delta devices")
> > Signed-off-by: David Lechner <dlechner@baylibre.com>
> > ---
>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.
>
> > drivers/iio/adc/ad_sigma_delta.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/iio/adc/ad_sigma_delta.c
> > b/drivers/iio/adc/ad_sigma_delta.c
> > index
> > 4c5f8d29a559fea7226b84141bcb148fb801f62c..1a2ee7c7f65afc60677af9f3138e59f6476f
> > 74c7 100644
> > --- a/drivers/iio/adc/ad_sigma_delta.c
> > +++ b/drivers/iio/adc/ad_sigma_delta.c
> > @@ -520,7 +520,7 @@ static int ad_sd_buffer_postenable(struct iio_dev
> > *indio_dev)
> > return ret;
> > }
> >
> > -static int ad_sd_buffer_postdisable(struct iio_dev *indio_dev)
> > +static int ad_sd_buffer_predisable(struct iio_dev *indio_dev)
> > {
> > struct ad_sigma_delta *sigma_delta =
> > iio_device_get_drvdata(indio_dev);
> >
> > @@ -644,7 +644,7 @@ static bool ad_sd_validate_scan_mask(struct iio_dev
> > *indio_dev, const unsigned l
> >
> > static const struct iio_buffer_setup_ops ad_sd_buffer_setup_ops = {
> > .postenable = &ad_sd_buffer_postenable,
> > - .postdisable = &ad_sd_buffer_postdisable,
> > + .predisable = &ad_sd_buffer_predisable,
> > .validate_scan_mask = &ad_sd_validate_scan_mask,
> > };
> >
> >
> > ---
> > base-commit: 6742eff60460e77158d4f1b233f17e0345c9e66a
> > change-id: 20250703-iio-adc-ad_sigma_delta-buffer-predisable-d10fc1914092
> >
> > Best regards,
prev parent reply other threads:[~2025-07-06 10:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 21:07 [PATCH] iio: adc: ad_sigma_delta: change to buffer predisable David Lechner
2025-07-04 12:43 ` Nuno Sá
2025-07-06 10:34 ` Jonathan Cameron [this message]
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=20250706113407.206682e7@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=noname.nuno@gmail.com \
--cc=nuno.sa@analog.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