iio: imu: inv_mpu6050: new timestamp mechanism

Check validity of interrupt timestamps by computing time between
2 interrupts. If it matches the chip frequency modulo 4%, it is
used as the data timestamp and also for estimating the chip
frequency measured from the system. Otherwise timestamp is
computed using the estimated chip frequency.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Jean-Baptiste Maneyrol 2018-05-28 15:22:04 +02:00 • committed by Jonathan Cameron
commit 4bcc19f1b2
3 changed files with 96 additions and 1 deletions