Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4b030a1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: pm: Ignore retention modes if regulator has disabled it"

parents c66808fd d95245d0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -586,6 +586,17 @@ void msm_pm_enable_retention(bool enable)
}
EXPORT_SYMBOL(msm_pm_enable_retention);

/**
 * msm_pm_retention_enabled() - Check if retention is enabled
 *
 * returns true if retention is enabled
 */
bool msm_pm_retention_enabled(void)
{
	return msm_pm_ldo_retention_enabled;
}
EXPORT_SYMBOL(msm_pm_retention_enabled);

static int msm_pm_snoc_client_probe(struct platform_device *pdev)
{
	int rc = 0;
+5 −0
Original line number Diff line number Diff line
@@ -422,6 +422,11 @@ int msm_pm_sleep_mode_allow(unsigned int cpu,
		unsigned int mode, bool idle)
{
	int idx = MSM_PM_MODE(cpu, mode);

	if ((mode == MSM_PM_SLEEP_MODE_RETENTION)
			&&  !msm_pm_retention_enabled())
		return false;

	if (idle)
		return msm_pm_sleep_modes[idx].idle_enabled &&
			msm_pm_sleep_modes[idx].idle_supported;
+1 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ enum msm_pm_sleep_mode msm_pm_idle_enter(struct cpuidle_device *dev,
			const struct msm_cpuidle_state *states);
void __init msm_pm_set_tz_retention_flag(unsigned int flag);
void msm_pm_enable_retention(bool enable);
bool msm_pm_retention_enabled(void);
void msm_cpu_pm_enter_sleep(enum msm_pm_sleep_mode mode, bool from_idle);

#ifdef CONFIG_MSM_PM