Re: [PATCH v2 3/3] iio: accel: icm42370: Add FIFO buffer functionality

Joshua Crofts <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, 13 Aug 2026 14:26:12 +0200
Kanak Shilledar <[email protected]> wrote:

...

> +static int inv_icm42370_buffer_postdisable(struct iio_dev *indio_dev)
> +{
> +	struct inv_icm42370_data *data = iio_priv(indio_dev);
> +	struct inv_sensors_timestamp *ts = &data->ts;
> +	struct device *dev = regmap_get_device(data->map);
> +	unsigned int sensor;
> +	unsigned int *watermark;
> +	struct inv_icm42370_conf conf = INV_ICM42370_SENSOR_CONF_INIT;
> +	unsigned int sleep_temp = 0;
> +	unsigned int sleep_sensor = 0;
> +	unsigned int sleep;
> +	int ret;
> +
> +	if (indio_dev == data->indio_accel) {
> +		sensor = INV_ICM42370_SENSOR_ACCEL;
> +		watermark = &data->fifo.watermark.accel;

You don't need this check, since the ICM42370 is an accelerometer only.
(I assume this is still an artifact from the ICM42600 driver you copied
from).

> +	} else {
> +		return -EINVAL;
> +	}
> +


-- 
Kind regards,
Joshua Crofts
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.