iio: imu: inv_mpu6050: fix user_ctrl register overwritten
authorJean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Mon, 30 Apr 2018 10:14:11 +0000 (12:14 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 May 2018 17:01:20 +0000 (18:01 +0100)
commitedddddd98cbda25da4370838c52b0457af807cda
tree47c80c2f055f813913736e830b1e135e98b8bf15
parentc2b82a690c9bc5dd1da4c12150dc2a0d3d570e97
iio: imu: inv_mpu6050: fix user_ctrl register overwritten

When in spi mode, we are setting i2c disable bit in user_ctrl
register. But the register is overwritten after when turning fifo
on. So save user_ctrl init value and always use it when updating
the register.

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_core.c
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_spi.c
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c