Commit d7bd473
iio: imu: inv_icm42600: stabilized timestamp in interrupt
Use IRQF_ONESHOT flag to ensure the timestamp is not updated in the
hard handler during the thread handler. And compute and use the
effective watermark value that correspond to this first timestamp.
This way we can ensure the timestamp is always corresponding to the
value used by the timestamping mechanism. Otherwise, it is possible
that between FIFO count read and FIFO processing the timestamp is
overwritten in the hard handler.
Fixes: ec74ae9 ("iio: imu: inv_icm42600: add accurate timestamping")
Cc: [email protected]
Signed-off-by: Jean-Baptiste Maneyrol <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>1 parent 95444b9 commit d7bd473
File tree
3 files changed
+20
-2
lines changed- drivers/iio/imu/inv_icm42600
3 files changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
225 | 228 | | |
226 | 229 | | |
| 230 | + | |
227 | 231 | | |
228 | 232 | | |
| 233 | + | |
229 | 234 | | |
230 | 235 | | |
231 | 236 | | |
| |||
241 | 246 | | |
242 | 247 | | |
243 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
244 | 256 | | |
245 | 257 | | |
246 | 258 | | |
| |||
514 | 526 | | |
515 | 527 | | |
516 | 528 | | |
517 | | - | |
| 529 | + | |
518 | 530 | | |
519 | 531 | | |
520 | 532 | | |
| |||
524 | 536 | | |
525 | 537 | | |
526 | 538 | | |
527 | | - | |
| 539 | + | |
528 | 540 | | |
529 | 541 | | |
530 | 542 | | |
| |||
577 | 589 | | |
578 | 590 | | |
579 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
580 | 595 | | |
581 | 596 | | |
582 | 597 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
| 540 | + | |
540 | 541 | | |
541 | 542 | | |
542 | 543 | | |
| |||
0 commit comments