From: Jonathan Cameron <jic23@kernel.org>
To: "Sabau, Radu bogdan" <radu.sabau@analog.com>
Cc: Radu Sabau via B4 Relay
<devnull+radu.sabau.analog.com@kernel.org>,
"Sa, Nuno" <Nuno.Sa@analog.com>,
"Hennerich, Michael" <Michael.Hennerich@analog.com>,
David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>,
Ramona Gradinariu <ramona.bolboaca13@gmail.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
linux <linux@analog.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6/7] iio: imu: adis16607: Add FIFO-based buffered capture
Date: Fri, 4 Dec 2026 22:51:16 +0000 [thread overview]
Message-ID: <20261204225116.5d09b60a@jic23-hlaptop> (raw)
In-Reply-To: <LV9PR03MB8414EF10692F84AFAB6318DDF74C2@LV9PR03MB8414.namprd03.prod.outlook.com>
On Wed, 2 Dec 2026 11:53:43 +0000
"Sabau, Radu bogdan" <radu.sabau@analog.com> wrote:
> > -----Original Message-----
> > From: Jonathan Cameron <jic23@kernel.org>
> > Sent: Sunday, November 29, 2026 12:00 AM
>
> ...
>
> > > + ret = __adis_write_reg_16(adis, ADIS16607_REG_USER_FIFO_CFG,
> > > + threshold & ADIS16607_FIFO_THR_MASK);
> > > + if (ret)
> > > + return ret;
> > > +
> > > + /*
> > > + * The device cannot mask DEV_NOK for us: unrouting it leaves the pin
> > > + * on its weak pull-up, which reads as asserted. Mask it on the host.
> > > + */
> >
> > Ah. This is the comment we need for the earlier patches. Is that generally
> > true for all the kfifo supported devices, or should we be using some sort
> > of flag to let the adis helper know if this is required?
>
> It is the same for all of them so far. The adis16475 FIFO variants and this
> driver set unmasked_drdy, which adislib uses for parts whose pin cannot
> be masked in the device.
> The interrupts are level triggered, so nothing is lost while masked on the host.
>
> The helper relied on this without saying so. In v2 its function comment will
> state that it is for such parts, and the commit messages of patches 2 and 4
> will give the reason.
> I did not add a device-side path, as there is no FIFO part that can mask in
> the device to test it on.
>
> Would you also like the helper to refuse to set up when unmasked_drdy
> is not set? I left it out to avoid code that cannot run today, but it is a
> three-line check.
If there is no path to it running, then probably not needed. However
if you feel it acts as convenient documentation to have the check, then
go ahead.
>
> >
> > > + enable_irq(adis->spi->irq);
>
> >
> >
> > > +
> > > + /* The core's default; the device watermark follows buffer/watermark
> > */
> > > + st->fifo_watermark = 1;
> > > +
> > > st->adis.ops = &adis16607_ops;
> > > + /*
> > > + * DEV_NOK is the OR of the DIAG_STAT flags and stays high until
> > > + * DIAG_STAT is read. Use a level interrupt so a flag raised while it
> > > + * is already high is not lost.
> > > + */
> > > + st->adis.irq_flag = IRQF_TRIGGER_HIGH;
> > For a modern driver explain why we don't get this from the firmware.
> >
>
> No good reason, other than DEV_NOK being active high.
> In v2 I will take the type from the interrupt specifier in firmware, falling
> back to level high if there is none.
For modern driver, don't have that fallback. If firmware is broken
we don't generally guess how to fix it. The problem with assuming
polarity has always been folk using not gates as cheap level shifters
when the sensor and SoC voltages are different.
Jonathan
>
next prev parent reply other threads:[~2026-12-04 22:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 13:25 [PATCH 0/7] iio: imu: adis: Use a kfifo buffer for the devices with a FIFO Radu Sabau via B4 Relay
2026-11-23 13:25 ` [PATCH 1/7] iio: imu: adis16475: Use the reset timeouts of the ADIS1657x Radu Sabau via B4 Relay
2026-11-26 13:34 ` Joshua Crofts
2026-11-28 21:49 ` Jonathan Cameron
2026-11-23 13:25 ` [PATCH 2/7] iio: imu: adis: Add a kfifo buffer setup helper for FIFO devices Radu Sabau via B4 Relay
2026-11-26 9:33 ` Sabau, Radu bogdan
2026-11-28 21:47 ` Jonathan Cameron
2026-12-02 11:43 ` Sabau, Radu bogdan
2026-11-23 13:25 ` [PATCH 3/7] iio: imu: adis16475: Pass the device and timestamp to the sample helpers Radu Sabau via B4 Relay
2026-11-23 13:25 ` [PATCH 4/7] iio: imu: adis16475: Use a kfifo buffer for the devices with a FIFO Radu Sabau via B4 Relay
2026-11-28 21:52 ` Jonathan Cameron
2026-11-23 13:25 ` [PATCH 5/7] iio: imu: adis: Drop the FIFO handling from the data ready trigger Radu Sabau via B4 Relay
2026-11-23 13:25 ` [PATCH 6/7] iio: imu: adis16607: Add FIFO-based buffered capture Radu Sabau via B4 Relay
2026-11-28 22:00 ` Jonathan Cameron
2026-12-02 11:53 ` Sabau, Radu bogdan
2026-12-04 22:51 ` Jonathan Cameron [this message]
2026-11-23 13:25 ` [PATCH 7/7] iio: imu: adis16607: Report loss of external sync Radu Sabau via B4 Relay
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=20261204225116.5d09b60a@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=Nuno.Sa@analog.com \
--cc=andy@kernel.org \
--cc=devnull+radu.sabau.analog.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=radu.sabau@analog.com \
--cc=ramona.bolboaca13@gmail.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
all inboxes | Powered by JetHome®