From: Jonathan Cameron <jic23@kernel.org>
To: Jean-Baptiste Maneyrol via B4 Relay
<devnull+jean-baptiste.maneyrol.tdk.com@kernel.org>
Cc: jean-baptiste.maneyrol@tdk.com,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
"Jean-Baptiste Maneyrol" <jmaneyrol@invensense.com>
Subject: Re: [PATCH 2/4] iio: imu: inv_icm42600: use 2 sensors fixed packet size of 16 bytes
Date: Fri, 21 Aug 2026 01:09:24 +0100 [thread overview]
Message-ID: <20260821010924.3761225d@jic23-huawei> (raw)
In-Reply-To: <20260820-inv-icm42600-enhacements-v1-2-075a881db557@tdk.com>
On Thu, 20 Aug 2026 21:02:38 +0200
Jean-Baptiste Maneyrol via B4 Relay <devnull+jean-baptiste.maneyrol.tdk.com@kernel.org> wrote:
> From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
>
> Sometimes dynamic switch between 1 sensor frame to 2 sensors frame is
> not working when there are too much frames already in the FIFO. By
> moving accel/gyro on sleep before turning FIFO on, we are storing many
> FIFO frames before updating the frame format hitting the bug everytime.
>
> Fix that by always using the 2 sensors frame of 16 bytes. Also update
> the hwfifo max watermark reported.
>
> Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
So from that description this sometimes happens without the reorder?
If so is it appropriate to give this a Fixes tag?
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
> index 998d312f7bde..043ae9deee65 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
> @@ -131,13 +131,13 @@ int inv_icm42600_buffer_set_fifo_en(struct inv_icm42600_state *st,
> INV_ICM42600_FIFO_CONFIG1_GYRO_EN |
> INV_ICM42600_FIFO_CONFIG1_ACCEL_EN;
>
> - val = 0;
> - if (fifo_en & INV_ICM42600_SENSOR_GYRO)
> - val |= INV_ICM42600_FIFO_CONFIG1_GYRO_EN;
> - if (fifo_en & INV_ICM42600_SENSOR_ACCEL)
> - val |= INV_ICM42600_FIFO_CONFIG1_ACCEL_EN;
> - if (fifo_en & INV_ICM42600_SENSOR_TEMP)
> - val |= INV_ICM42600_FIFO_CONFIG1_TEMP_EN;
> + /* always enable/disable all bits for allowing dynamic transitions */
This needs a little more. It makes sense in the context of
this patch but will seem rather odd if we look at it sometime in
the distant future. Dynamic transitions of what?
> + if (fifo_en)
> + val = INV_ICM42600_FIFO_CONFIG1_TEMP_EN |
> + INV_ICM42600_FIFO_CONFIG1_GYRO_EN |
> + INV_ICM42600_FIFO_CONFIG1_ACCEL_EN;
> + else
> + val = 0;
>
> ret = regmap_update_bits(st->map, INV_ICM42600_REG_FIFO_CONFIG1, mask, val);
> if (ret)
> @@ -149,19 +149,6 @@ int inv_icm42600_buffer_set_fifo_en(struct inv_icm42600_state *st,
> return 0;
> }
next prev parent reply other threads:[~2026-08-21 0:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 19:02 [PATCH 0/4] inv_icm42600 driver enhancements Jean-Baptiste Maneyrol via B4 Relay
2026-08-20 19:02 ` Jean-Baptiste Maneyrol
2026-08-20 19:02 ` [PATCH 1/4] iio: imu: inv_icm42600: sleep before enabling FIFO data Jean-Baptiste Maneyrol via B4 Relay
2026-08-20 19:02 ` Jean-Baptiste Maneyrol
2026-08-21 0:06 ` Jonathan Cameron
2026-08-21 12:39 ` Jean-Baptiste Maneyrol
2026-08-21 11:15 ` Andy Shevchenko
2026-08-21 12:50 ` Jean-Baptiste Maneyrol
2026-08-21 13:21 ` Andy Shevchenko
2026-08-20 19:02 ` [PATCH 2/4] iio: imu: inv_icm42600: use 2 sensors fixed packet size of 16 bytes Jean-Baptiste Maneyrol via B4 Relay
2026-08-20 19:02 ` Jean-Baptiste Maneyrol
2026-08-21 0:09 ` Jonathan Cameron [this message]
2026-08-21 12:59 ` Jean-Baptiste Maneyrol
2026-08-20 19:02 ` [PATCH 3/4] iio: imu: inv_icm42600: simplify watermark computation by using gcd Jean-Baptiste Maneyrol via B4 Relay
2026-08-20 19:02 ` Jean-Baptiste Maneyrol
2026-08-21 0:14 ` Jonathan Cameron
2026-08-21 13:01 ` Jean-Baptiste Maneyrol
2026-08-20 19:02 ` [PATCH 4/4] iio: imu: inv_icm42600: do not read FIFO count for watermark it Jean-Baptiste Maneyrol via B4 Relay
2026-08-20 19:02 ` Jean-Baptiste Maneyrol
2026-08-21 0:28 ` Jonathan Cameron
2026-08-21 13:09 ` Jean-Baptiste Maneyrol
2026-08-23 1:13 ` Jonathan Cameron
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=20260821010924.3761225d@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=devnull+jean-baptiste.maneyrol.tdk.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jean-baptiste.maneyrol@tdk.com \
--cc=jmaneyrol@invensense.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.