Commit 4c06967
committed
iio: gyro: mpu3050: Fix alignment and size issues with buffers.
Fix a set of closely related issues.
1. When using fifo_values() there was not enough space for the timestamp to
be inserted by iio_push_to_buffers_with_timestamp()
2. fifo_values() did not meet the alignment requirement of
iio_push_to_buffers_with_timestamp()
3. hw_values did not meet the alignment requirement either.
1 and 2 fixed by using new iio_push_to_buffers_with_ts_unaligned() which has
no alignment or space padding requirements.
3 fixed by introducing a structure that makes the space and alignment
requirements explicit.
Fixes: 3904b28 ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210613151039.569883-4-jic23@kernel.org1 parent f3e1a57 commit 4c06967
1 file changed
+11
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
481 | 478 | | |
482 | 479 | | |
483 | 480 | | |
| |||
572 | 569 | | |
573 | 570 | | |
574 | 571 | | |
575 | | - | |
576 | | - | |
577 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
578 | 576 | | |
579 | 577 | | |
580 | 578 | | |
| |||
632 | 630 | | |
633 | 631 | | |
634 | 632 | | |
635 | | - | |
636 | | - | |
| 633 | + | |
| 634 | + | |
637 | 635 | | |
638 | 636 | | |
639 | 637 | | |
640 | 638 | | |
641 | 639 | | |
642 | 640 | | |
643 | | - | |
| 641 | + | |
644 | 642 | | |
645 | 643 | | |
646 | 644 | | |
| |||
0 commit comments