Re: [PATCH v6 5/6] iio: pressure: dps310: add hardware FIFO support

From: Rupesh Majhi

Date: Sun Sep 06 2026 - 06:10:45 EST


On Tue, 25 Aug 2026 12:39:42 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> I stopped here, I think you should understand what this code is all doing. Now
> it's an AI mess. Split this patch to a few smaller ones each of them you understand.

v7 splits this one into three:

read buffered samples from the hardware FIFO
derive the drain interval from the watermark
implement .hwfifo_flush_to_buffer()

The timestamp estimation goes entirely, which Jonathan asked for. With 3/6
split as you asked, v7 is nine patches.

Retesting on the BeagleBone turned up a bug here: the drain discards the
compensation temperature when a batch pushes nothing, so a capture can fail
to start at all. 4 of 6 buffer enables produced nothing in 3 s at 32 Hz
pressure and 1 Hz temperature. Numbers in my reply to Jonathan on this
patch.

> Can _rate:s be negative?

No, both getters return BIT() of a three-bit field, so 1 to 128. Errors
come back through the return value.

> 30 * USEC_PER_MSEC

Pre-existing, like the min_t(s64, ...) from July. Both are in the cleanup
series rather than here.

Rupesh