iio: imu: inv_mpu6050: skip first sample when gyro is on
authorJean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Mon, 30 Apr 2018 10:14:10 +0000 (12:14 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 May 2018 16:56:26 +0000 (17:56 +0100)
commitc2b82a690c9bc5dd1da4c12150dc2a0d3d570e97
tree0e7ac0380a391689e82dc42dd25b4996bec30a97
parentca4c8fc97e669d7464a95e006d0ca4eadfa4e4bc
iio: imu: inv_mpu6050: skip first sample when gyro is on

Implement generic skip first samples mechanism and use it to
filter out first sample when gyro is on.

The problem for these chips is that the first sample of the gyro
is out of specs, because gyro is not completely stabilized. To
ensure all data are within sensor specs, we just skip the first
sample when turning gyro on.

Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c