Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Radu Sabau" <radu.sabau@analog.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v6 6/8] iio: imu: adis16607: Add FIFO-based buffered capture
Date: Fri, 13 Nov 2026 12:51:45 +0000	[thread overview]
Message-ID: <sashiko-outbox-212791@kernel.org> (raw)
In-Reply-To: <20261113-adis16607-v6-6-3f678719942a@analog.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] iio: imu: adis16607: initial fifo_watermark in adis16607_probe()
  is overwritten on buffer enable
--

commit 432b63f4ff217d947afef093d1237f760013e881
Author: Radu Sabau <radu.sabau@analog.com>

iio: imu: adis16607: Add FIFO-based buffered capture

This commit adds hardware FIFO buffered capture support to the adis16607
driver using a kfifo buffer, a level-triggered threaded interrupt handler,
and configurable watermark attributes.

> diff --git a/drivers/iio/imu/adis16607.c b/drivers/iio/imu/adis16607.c
> index f5dc37c54191e..377e7c46f860b 100644
> --- a/drivers/iio/imu/adis16607.c
> +++ b/drivers/iio/imu/adis16607.c
[ ... ]
> @@ -228,6 +262,333 @@ static const struct adis_ops adis16607_ops = {
[ ... ]
> +static ssize_t hwfifo_watermark_show(struct device *dev,
> +				     struct device_attribute *attr,
> +				     char *buf)
> +{
> +	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
> +	struct adis16607 *st = iio_priv(indio_dev);
> +
> +	return sysfs_emit(buf, "%u\n", st->fifo_watermark);
> +}
[ ... ]
> +static int adis16607_set_watermark(struct iio_dev *indio_dev, unsigned int val)
> +{
> +	struct adis16607 *st = iio_priv(indio_dev);
> +
> +	val = clamp(val, 1, ADIS16607_MAX_FIFO_WM);
> +	st->fifo_watermark = val;
> +
> +	return 0;
> +}
[ ... ]
> @@ -792,6 +1183,8 @@ static int adis16607_probe(struct spi_device *spi)
>  	indio_dev->info = &adis16607_info;
>  	indio_dev->modes = INDIO_DIRECT_MODE;
>  
> +	st->fifo_watermark = ADIS16607_MAX_FIFO_WM;

[Severity: Low]
Does initializing st->fifo_watermark to ADIS16607_MAX_FIFO_WM take effect
when the buffer is enabled?

devm_iio_kfifo_buffer_setup_ext() initializes buffer->watermark to 1 via
iio_kfifo_allocate() -> iio_buffer_init(), and iio_enable_buffers() calls
hwfifo_set_watermark() with that value before postenable() runs. As a
result, hwfifo_watermark reports 38 in sysfs before the first capture while
buffer/watermark is 1, and enabling the buffer immediately overwrites
st->fifo_watermark with 1 before adis16607_buffer_postenable() programs
ADIS16607_REG_USER_FIFO_CFG.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261113-adis16607-v6-0-3f678719942a@analog.com?part=6

  reply	other threads:[~2026-11-13 12:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 12:33 [PATCH v6 0/8] iio: imu: Add support for the ADI ADIS16607 Radu Sabau via B4 Relay
2026-11-13 12:33 ` [PATCH v6 1/8] iio: imu: adis: Fix custom reset dispatch in adislib Radu Sabau via B4 Relay
2026-11-13 12:33 ` [PATCH v6 2/8] iio: imu: adis: Add optional self_test callback Radu Sabau via B4 Relay
2026-11-13 12:33 ` [PATCH v6 3/8] iio: imu: adis: Add optional init callback Radu Sabau via B4 Relay
2026-11-13 12:33 ` [PATCH v6 4/8] dt-bindings: iio: imu: Add bindings for ADI ADIS16607 Radu Sabau via B4 Relay
2026-11-13 12:33 ` [PATCH v6 5/8] iio: imu: Add driver for the " Radu Sabau via B4 Relay
2026-11-13 12:33 ` [PATCH v6 6/8] iio: imu: adis16607: Add FIFO-based buffered capture Radu Sabau via B4 Relay
2026-11-13 12:51   ` sashiko-bot [this message]
2026-11-13 12:33 ` [PATCH v6 7/8] iio: imu: adis16607: Add external clock sync support Radu Sabau via B4 Relay
2026-11-13 12:33 ` [PATCH v6 8/8] iio: imu: adis16607: Add calibration bias support for gyro/accel Radu Sabau via B4 Relay
2026-11-13 12:41 ` [PATCH v6 0/8] iio: imu: Add support for the ADI ADIS16607 Sabau, Radu bogdan

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-212791@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=radu.sabau@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