mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Merge "clk: qcom: gdsc-regulator: Poll PWR_ON during GDSC HW to SW mode switch"
This commit is contained in:
commit
7d84d3968c
1 changed files with 14 additions and 0 deletions
|
|
@ -499,6 +499,20 @@ static int gdsc_set_mode(struct regulator_dev *rdev, unsigned int mode)
|
|||
*/
|
||||
gdsc_mb(sc);
|
||||
udelay(1);
|
||||
/*
|
||||
* While switching from HW to SW mode, HW may be busy
|
||||
* updating internal required signals. Polling for PWR_ON
|
||||
* ensures that the GDSC switches to SW mode before software
|
||||
* starts to use SW mode.
|
||||
*/
|
||||
if (sc->is_gdsc_enabled) {
|
||||
ret = poll_gdsc_status(sc, ENABLED);
|
||||
if (ret) {
|
||||
dev_err(&rdev->dev, "%s enable timed out\n",
|
||||
sc->rdesc.name);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
sc->is_gdsc_hw_ctrl_mode = false;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue