From: sashiko-bot@kernel.org
To: "Marcelo Schmitt" <marcelo.schmitt@analog.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 09/13] dt-bindings: iio: adc: adi,ad4134: Document external multiplexer usage
Date: Tue, 06 Oct 2026 18:32:15 +0000 [thread overview]
Message-ID: <sashiko-outbox-162347@kernel.org> (raw)
In-Reply-To: <14fe942a44bb0dd67eb9e25e533572e5cbe32b87.1791309733.git.marcelo.schmitt@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] iio: redundant use of sync_lock mutex
--
commit c725b04fb026c820b0d14c82b9c9ef92e634640f
Author: Marcelo Schmitt <marcelo.schmitt@analog.com>
iio: adc: ad4134: Support buffered data read
Enable users to run buffered data captures triggered by IIO trigger device.
Add an IIO timestamp channel so each data scan is provided with measurement
time information. Require single-read operations to be in IIO device direct
access mode to prevent buffered and single-shot data captures to disrupt
each other.
> diff --git a/drivers/iio/adc/ad4134.c b/drivers/iio/adc/ad4134.c
> index 3048e61a3cb13..b5207f16054e4 100644
> --- a/drivers/iio/adc/ad4134.c
> +++ b/drivers/iio/adc/ad4134.c
[ ... ]
> @@ -342,6 +391,10 @@ static int ad4134_read_raw(struct iio_dev *indio_dev,
>
> switch (info) {
> case IIO_CHAN_INFO_RAW: {
> + IIO_DEV_ACQUIRE_DIRECT_MODE(indio_dev, claim);
> + if (IIO_DEV_ACQUIRE_FAILED(claim))
> + return -EBUSY;
> +
> guard(mutex)(&st->sync_lock);
[Severity: Low]
Is the st->sync_lock mutex still needed here?
Because the IIO direct mode macro inherently acquires the global
indio_dev->mlock, it already serializes callbacks like ad4134_read_raw(),
ad4134_write_raw(), and ad4134_set_filter_type() against each other, and
prevents execution while the buffer is active.
Since st->sync_lock is always acquired immediately after successfully calling
IIO_DEV_ACQUIRE_DIRECT_MODE(indio_dev, claim) in these locations, it doesn't
seem to provide any additional synchronization.
Could st->sync_lock be removed to reduce locking overhead and complexity?
>
> gpiod_set_value_cansleep(st->odr_gpio, 1);
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1791309733.git.marcelo.schmitt@analog.com?part=9
next prev parent reply other threads:[~2026-10-06 18:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 18:15 [PATCH v4 00/13] iio: adc: ad4134: Enable greater sample rate data capture Marcelo Schmitt
2026-10-06 18:16 ` [PATCH v4 01/13] iio: adc: ad4134: Adjust register map range Marcelo Schmitt
2026-10-06 18:16 ` [PATCH v4 02/13] iio: adc: ad4134: Sign extend sample data Marcelo Schmitt
2026-10-06 18:32 ` sashiko-bot
2026-10-06 18:16 ` [PATCH v4 03/13] iio: adc: ad4134: Update include list to comply with IWYU principles Marcelo Schmitt
2026-10-06 18:17 ` [PATCH v4 04/13] iio: adc: ad4134: Serialize single-read operations Marcelo Schmitt
2026-10-06 18:17 ` [PATCH v4 05/13] iio: adc: ad4134: Run shorter transfers when CRC is disabled Marcelo Schmitt
2026-10-06 18:32 ` sashiko-bot
2026-10-06 18:17 ` [PATCH v4 06/13] iio: adc: ad4134: Add support for digital filter type selection Marcelo Schmitt
2026-10-06 18:17 ` [PATCH v4 07/13] iio: adc: ad4134: Support buffered data read Marcelo Schmitt
2026-10-06 18:36 ` sashiko-bot
2026-10-06 18:18 ` [PATCH v4 08/13] dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode Marcelo Schmitt
2026-10-06 18:29 ` sashiko-bot
2026-10-07 10:14 ` Conor Dooley
2026-10-06 18:18 ` [PATCH v4 09/13] dt-bindings: iio: adc: adi,ad4134: Document external multiplexer usage Marcelo Schmitt
2026-10-06 18:32 ` sashiko-bot [this message]
2026-10-06 18:19 ` [PATCH v4 10/13] iio: adc: ad4134: Support SPI 4-wire mode Marcelo Schmitt
2026-10-06 18:35 ` sashiko-bot
2026-10-06 18:19 ` [PATCH v4 11/13] dt-bindings: iio: adc: adi,ad4134: Document PWM usage Marcelo Schmitt
2026-10-06 18:27 ` sashiko-bot
2026-10-06 18:19 ` [PATCH v4 12/13] iio: adc: ad4134: Support high-speed data capture Marcelo Schmitt
2026-10-06 18:35 ` sashiko-bot
2026-10-06 18:19 ` [PATCH v4 13/13] Docs: iio: Add AD4134 Marcelo Schmitt
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=sashiko-outbox-162347@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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