From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>,
Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.1.y] iio: imu: inv_icm42600: fix parsing of all FIFO frames for odr change
Date: Thu, 26 Nov 2026 11:51:09 -0500 [thread overview]
Message-ID: <20261126165101.2654005-1-sashal@kernel.org> (raw)
In-Reply-To: <2026112557-lustiness-canning-81fb@gregkh>
From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
[ Upstream commit 4a141623442888458d147f4e61fe47411c0e4e17 ]
For getting all odr change events, we need to parse all FIFO frames
in each iio device. Fix this correctly by sending effectively all
frames to all iio devices.
Previously only batches of frames containing a matching sensor event
were sent to the corresponding iio device.
Fixes: f670d4d34773 ("iio: imu: inv_icm42600: fix odr change not caught in certain cases")
Cc: stable@vger.kernel.org
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../imu/inv_icm42600/inv_icm42600_buffer.c | 24 ++++++++-----------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
index cb4520b184b01..9bb5fe639955e 100644
--- a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
+++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
@@ -531,22 +531,20 @@ int inv_icm42600_buffer_fifo_parse(struct inv_icm42600_state *st)
ts = iio_priv(st->indio_gyro);
inv_sensors_timestamp_interrupt(ts, st->fifo.watermark.eff_gyro,
st->timestamp.gyro);
- ret = inv_icm42600_gyro_parse_fifo(st->indio_gyro);
- if (ret)
- return ret;
}
+ ret = inv_icm42600_gyro_parse_fifo(st->indio_gyro);
+ if (ret)
+ return ret;
+
/* handle accelerometer timestamp and FIFO data parsing */
if (st->fifo.nb.accel > 0) {
ts = iio_priv(st->indio_accel);
inv_sensors_timestamp_interrupt(ts, st->fifo.watermark.eff_accel,
st->timestamp.accel);
- ret = inv_icm42600_accel_parse_fifo(st->indio_accel);
- if (ret)
- return ret;
}
- return 0;
+ return inv_icm42600_accel_parse_fifo(st->indio_accel);
}
int inv_icm42600_buffer_hwfifo_flush(struct inv_icm42600_state *st,
@@ -569,20 +567,18 @@ int inv_icm42600_buffer_hwfifo_flush(struct inv_icm42600_state *st,
if (st->fifo.nb.gyro > 0) {
ts = iio_priv(st->indio_gyro);
inv_sensors_timestamp_interrupt(ts, st->fifo.nb.gyro, gyro_ts);
- ret = inv_icm42600_gyro_parse_fifo(st->indio_gyro);
- if (ret)
- return ret;
}
+ ret = inv_icm42600_gyro_parse_fifo(st->indio_gyro);
+ if (ret)
+ return ret;
+
if (st->fifo.nb.accel > 0) {
ts = iio_priv(st->indio_accel);
inv_sensors_timestamp_interrupt(ts, st->fifo.nb.accel, accel_ts);
- ret = inv_icm42600_accel_parse_fifo(st->indio_accel);
- if (ret)
- return ret;
}
- return 0;
+ return inv_icm42600_accel_parse_fifo(st->indio_accel);
}
int inv_icm42600_buffer_init(struct inv_icm42600_state *st)
--
2.53.0
prev parent reply other threads:[~2026-11-26 16:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 12:21 FAILED: patch "[PATCH] iio: imu: inv_icm42600: fix parsing of all FIFO frames for" failed to apply to 6.1-stable tree gregkh
2026-11-26 16:51 ` Sasha Levin [this message]
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=20261126165101.2654005-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=jean-baptiste.maneyrol@tdk.com \
--cc=jonathan.cameron@oss.qualcomm.com \
--cc=stable@vger.kernel.org \
/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