aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
diff options
context:
space:
mode:
authorJean-Baptiste Maneyrol <jmaneyrol@invensense.com>2020-02-19 15:39:52 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-03-08 17:28:38 +0000
commit398da9942359efad600b9efb33e6573fedc9276d (patch)
tree9ad89bd2be5565a068269f31cd45735f59e6a615 /drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
parentiio: imu: inv_mpu6050: add all signal path resets at init (diff)
downloadwireguard-linux-398da9942359efad600b9efb33e6573fedc9276d.tar.xz
wireguard-linux-398da9942359efad600b9efb33e6573fedc9276d.zip
iio: imu: inv_mpu6050: reduce sleep time when turning regulators on
Turning vdd regulator on requires a consequent sleep for the chip to power on correctly. Turning vddio regulator is much faster. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/imu/inv_mpu6050/inv_mpu_core.c')
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
index 3502b996671c..63cdde20df7e 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
@@ -1201,7 +1201,7 @@ static int inv_mpu_core_enable_regulator_vddio(struct inv_mpu6050_state *st)
"Failed to enable vddio regulator: %d\n", result);
} else {
/* Give the device a little bit of time to start up. */
- usleep_range(35000, 70000);
+ usleep_range(3000, 5000);
}
return result;
@@ -1321,6 +1321,7 @@ int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name,
dev_err(dev, "Failed to enable vdd regulator: %d\n", result);
return result;
}
+ msleep(INV_MPU6050_POWER_UP_TIME);
result = inv_mpu_core_enable_regulator_vddio(st);
if (result) {