Re: [PATCH v11 3/5] iio: pressure: dps310: derive the drain interval from the watermark
From: Andy Shevchenko
Date: Fri Oct 02 2026 - 03:59:12 EST
On Fri, Oct 02, 2026 at 10:25:24AM +0300, Rupesh Majhi wrote:
> The drain interval only tracked how fast the FIFO fills, so a small
> watermark still waited half a FIFO for its samples. Take the watermark
> as the number of scans to wait for, but never drain slower than half a
> fill.
...
> -static unsigned int dps310_fifo_interval(int prs_rate, int tmp_rate)
> +static unsigned int dps310_fifo_interval(struct dps310_data *data, int prs_rate,
> + int tmp_rate)
Better to split on a logical boundary:
static unsigned int dps310_fifo_interval(struct dps310_data *data,
int prs_rate, int tmp_rate)
--
With Best Regards,
Andy Shevchenko