Hello Jonathan, this is OK, problem resolved now. Sorry for the mess. I will try to warn about that next time. Thanks a lot, JB ________________________________________ From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Sent: Friday, May 3, 2024 12:11 To: INV Git Commit <INV.git-commit@xxxxxxx> Cc: jic23@xxxxxxxxxx <jic23@xxxxxxxxxx>; linux-iio@xxxxxxxxxxxxxxx <linux-iio@xxxxxxxxxxxxxxx>; Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@xxxxxxx> Subject: Re: [PATCH] iio: imu: inv_icm42600: fix timestamp patch integration This Message Is From an External Sender This message came from outside your organization. On Fri, 3 May 2024 09:07:00 +0000 inv.git-commit@xxxxxxx wrote: > From: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@xxxxxxx> > > For fixing commit a5918cecaec3650df in iio tree. > > Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@xxxxxxx> Squashed in and togreg tree updated. Please check it! I'm not having a good run with this patch, so maybe this is 3rd time lucky ;) Jonathan > --- > drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c > index bce25ff57ecd..63b85ec88c13 100644 > --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c > +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c > @@ -503,6 +503,8 @@ int inv_icm42600_buffer_fifo_read(struct inv_icm42600_state *st, > > int inv_icm42600_buffer_fifo_parse(struct inv_icm42600_state *st) > { > + struct inv_icm42600_sensor_state *gyro_st = iio_priv(st->indio_gyro); > + struct inv_icm42600_sensor_state *accel_st = iio_priv(st->indio_accel); > struct inv_sensors_timestamp *ts; > int ret; > > @@ -511,7 +513,7 @@ int inv_icm42600_buffer_fifo_parse(struct inv_icm42600_state *st) > > /* handle gyroscope timestamp and FIFO data parsing */ > if (st->fifo.nb.gyro > 0) { > - ts = iio_priv(st->indio_gyro); > + ts = &gyro_st->ts; > inv_sensors_timestamp_interrupt(ts, st->fifo.nb.gyro, > st->timestamp.gyro); > ret = inv_icm42600_gyro_parse_fifo(st->indio_gyro); > @@ -521,7 +523,7 @@ int inv_icm42600_buffer_fifo_parse(struct inv_icm42600_state *st) > > /* handle accelerometer timestamp and FIFO data parsing */ > if (st->fifo.nb.accel > 0) { > - ts = iio_priv(st->indio_accel); > + ts = &accel_st->ts; > inv_sensors_timestamp_interrupt(ts, st->fifo.nb.accel, > st->timestamp.accel); > ret = inv_icm42600_accel_parse_fifo(st->indio_accel); > @@ -535,6 +537,8 @@ int inv_icm42600_buffer_fifo_parse(struct inv_icm42600_state *st) > int inv_icm42600_buffer_hwfifo_flush(struct inv_icm42600_state *st, > unsigned int count) > { > + struct inv_icm42600_sensor_state *gyro_st = iio_priv(st->indio_gyro); > + struct inv_icm42600_sensor_state *accel_st = iio_priv(st->indio_accel); > struct inv_sensors_timestamp *ts; > int64_t gyro_ts, accel_ts; > int ret; > @@ -550,7 +554,7 @@ int inv_icm42600_buffer_hwfifo_flush(struct inv_icm42600_state *st, > return 0; > > if (st->fifo.nb.gyro > 0) { > - ts = iio_priv(st->indio_gyro); > + ts = &gyro_st->ts; > inv_sensors_timestamp_interrupt(ts, st->fifo.nb.gyro, gyro_ts); > ret = inv_icm42600_gyro_parse_fifo(st->indio_gyro); > if (ret) > @@ -558,7 +562,7 @@ int inv_icm42600_buffer_hwfifo_flush(struct inv_icm42600_state *st, > } > > if (st->fifo.nb.accel > 0) { > - ts = iio_priv(st->indio_accel); > + ts = &accel_st->ts; > inv_sensors_timestamp_interrupt(ts, st->fifo.nb.accel, accel_ts); > ret = inv_icm42600_accel_parse_fifo(st->indio_accel); > if (ret)