mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
iio: magn: ak8975: allow a delay after enabling regulators
The datasheet actually specifies that we need to wait atleast 500us after powering on the device before trying to set mode. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
9e6c16d989
commit
b1037c1a49
1 changed files with 6 additions and 0 deletions
|
|
@ -399,6 +399,12 @@ static int ak8975_power_on(const struct ak8975_data *data)
|
|||
"Failed to enable specified Vid supply\n");
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
* According to the datasheet the power supply rise time i 200us
|
||||
* and the minimum wait time before mode setting is 100us, in
|
||||
* total 300 us. Add some margin and say minimum 500us here.
|
||||
*/
|
||||
usleep_range(500, 1000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue