iio: gyro: convert to iio_push_to_buffers_with_ts()
Subsystems (3)
cover iio: gyro: convert to iio_push_to_buffers_with_ts()
Convert the gyro drivers that still use the deprecated iio_push_to_buffers_with_timestamp() to iio_push_to_buffers_with_ts(), which takes and checks the destination buffer size.
Each pushes a struct with an aligned_s64 timestamp, so the change is passing sizeof() of that buffer at the push site. No functional change.
Gabriel Rondon (3):
iio: gyro: adxrs290: use iio_push_to_buffers_with_ts()
iio: gyro: bmg160: use iio_push_to_buffers_with_ts()
iio: gyro: itg3200: use iio_push_to_buffers_with_ts()
drivers/iio/gyro/adxrs290.c | 4 ++-- drivers/iio/gyro/bmg160_core.c | 4 ++-- drivers/iio/gyro/itg3200_buffer.c | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-)
Signature · 1 line
2.50.1 (Apple Git-155)
PATCH 1/3 iio: gyro: adxrs290: use iio_push_to_buffers_with_ts()
Replace the deprecated iio_push_to_buffers_with_timestamp() with iio_push_to_buffers_with_ts(), passing the size of the pushed buffer.
--- drivers/iio/gyro/adxrs290.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/adxrs290.c +2 -2
@@ -502,8 +502,8 @@ static irqreturn_t adxrs290_trigger_handler(int irq, void *p)if (ret <0 )break ; -iio_push_to_buffers_with_timestamp (indio_dev, &st->buffer, - pf->timestamp); +iio_push_to_buffers_with_ts (indio_dev, &st->buffer, +sizeof (st->buffer), pf->timestamp); }while (0 );iio_trigger_notify_done (indio_dev->trig);
Signature · 1 line
2.50.1 (Apple Git-155)
PATCH 2/3 iio: gyro: bmg160: use iio_push_to_buffers_with_ts()
In reply to Gabriel RondonReplace the deprecated iio_push_to_buffers_with_timestamp() with iio_push_to_buffers_with_ts(), passing the size of the pushed buffer.
--- drivers/iio/gyro/bmg160_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/gyro/bmg160_core.c +2 -2
@@ -897,8 +897,8 @@ static irqreturn_t bmg160_trigger_handler(int irq, void *p)if (ret <0 ) goto err; -iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, - pf->timestamp); +iio_push_to_buffers_with_ts (indio_dev, &data->scan, +sizeof (data->scan), pf->timestamp); err:iio_trigger_notify_done (indio_dev->trig);
Signature · 1 line
2.50.1 (Apple Git-155)
PATCH 3/3 iio: gyro: itg3200: use iio_push_to_buffers_with_ts()
In reply to Gabriel RondonReplace the deprecated iio_push_to_buffers_with_timestamp() with iio_push_to_buffers_with_ts(), passing the size of the pushed buffer.
--- drivers/iio/gyro/itg3200_buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/gyro/itg3200_buffer.c +2 -1
@@ -59,7 +59,8 @@ static irqreturn_t itg3200_trigger_handler(int irq, void *p)if (ret <0 ) goto error_ret; -iio_push_to_buffers_with_timestamp (indio_dev, &scan, pf->timestamp); +iio_push_to_buffers_with_ts (indio_dev, &scan,sizeof (scan), + pf->timestamp); error_ret:iio_trigger_notify_done (indio_dev->trig);
Signature · 1 line
2.50.1 (Apple Git-155)
Quoted 12 lines · Gabriel Rondon
Convert the gyro drivers that still use the deprecated
iio_push_to_buffers_with_timestamp()toiio_push_to_buffers_with_ts(), which takes and checks the destination buffer size.Each pushes a struct with an
aligned_s64timestamp, so the change is passingsizeof()of that buffer at the push site. No functional change.Gabriel Rondon (3):
iio: gyro: adxrs290: useiio_push_to_buffers_with_ts()
iio: gyro: bmg160: useiio_push_to_buffers_with_ts()
iio: gyro: itg3200: useiio_push_to_buffers_with_ts()
Quoted 5 lines
drivers/iio/gyro/adxrs290.c | 4 ++-- drivers/iio/gyro/bmg160_core.c | 4 ++-- drivers/iio/gyro/itg3200_buffer.c | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-)
These check out. I also looked for alignment/DMA issues.
Jonathan Cameron
maintainerQuoted 19 lines · On Sat, 22 Aug 2026 18:25:57 -0500 David Lechner <[email protected]> wrote:
Quoted 12 lines · Gabriel Rondon
Convert the gyro drivers that still use the deprecated
iio_push_to_buffers_with_timestamp()toiio_push_to_buffers_with_ts(), which takes and checks the destination buffer size.Each pushes a struct with an
aligned_s64timestamp, so the change is passingsizeof()of that buffer at the push site. No functional change.Gabriel Rondon (3):
iio: gyro: adxrs290: useiio_push_to_buffers_with_ts()
iio: gyro: bmg160: useiio_push_to_buffers_with_ts()
iio: gyro: itg3200: useiio_push_to_buffers_with_ts()Quoted 5 lines
drivers/iio/gyro/adxrs290.c | 4 ++-- drivers/iio/gyro/bmg160_core.c | 4 ++-- drivers/iio/gyro/itg3200_buffer.c | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-)
Quoted 4 lines
These check out. I also looked for alignment/DMA issues.
Reviewed-by David Lechner <[email protected]>
Applied to the testing branch of iio.git. I'll rebase that on rc1 when that is available and then it will go out as togreg for linux-next to pick up.
Nice little series.
Thanks,
Jonathan