MALI: bifrost: disable regulator when pm status is suspended

The system calls pm_runtime_get_noresume() to prevent device
from entering to runtime suspend status when reboot, and the
pm_runtime_put_sync_suspend() is called in a delay work,
so when reboot the power domain may be power on,
but the regulator is disabled, it's not allowed.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie25451ddf4fc866e93e7272a8d9a809919a96e1d
This commit is contained in:
Finley Xiao
2022-05-07 17:54:06 +08:00
committed by Tao Huang
parent fe111758d6
commit e7fd42c35e

View File

@@ -105,8 +105,10 @@ static void rk_pm_power_off_delay_work(struct work_struct *work)
rk_pm_disable_clk(kbdev);
rk_pm_disable_regulator(kbdev);
platform->is_regulator_on = false;
if (pm_runtime_suspended(kbdev->dev)) {
rk_pm_disable_regulator(kbdev);
platform->is_regulator_on = false;
}
platform->is_powered = false;
wake_unlock(&platform->wake_lock);