]> asedeno.scripts.mit.edu Git - linux.git/commit
iio: imu: inv_mpu6050: clean set_power_itg and fix usage
authorJean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Tue, 17 Apr 2018 07:19:39 +0000 (09:19 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Apr 2018 15:02:42 +0000 (16:02 +0100)
commit7fc01685401a9abfa5d846131fdc3c34b96a0de9
tree550906c6f7dc6fb7affe1c581e753b6da1c8776e
parent918f958987e979813f7c6a75f0aac13167aebab9
iio: imu: inv_mpu6050: clean set_power_itg and fix usage

Rewrite set_power_itg. Failing when turning power off is
no more decreasing the counter now and sleeping only happens
when effectively turning the chip on. Fix also usage in init
function (setting power on one time is sufficient to ensure
chip is effectively 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_core.c