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

Commit 761f4b44 authored by Phani Kumar Uppalapati's avatar Phani Kumar Uppalapati
Browse files

mfd: wcd9xxx-irq: add pm awake and relax to hold wake lock



To honor codec interrupts, after pm qos update request is
sent, awake/relax apis need to be called otherwise to keep
system awake to process any interrupts from the codec.

CRs-Fixed: 776130
Change-Id: I2fb25d58947b638a4b650e499172ae029edfad19
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
parent 0580b551
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ bool wcd9xxx_lock_sleep(
		pr_debug("%s: holding wake lock\n", __func__);
		pm_qos_update_request(&wcd9xxx_res->pm_qos_req,
				      msm_cpuidle_get_deep_idle_latency());
		pm_stay_awake(wcd9xxx_res->dev);
	}
	mutex_unlock(&wcd9xxx_res->pm_lock);

@@ -204,6 +205,7 @@ void wcd9xxx_unlock_sleep(
			wcd9xxx_res->pm_state = WCD9XXX_PM_SLEEPABLE;
		pm_qos_update_request(&wcd9xxx_res->pm_qos_req,
				PM_QOS_DEFAULT_VALUE);
		pm_relax(wcd9xxx_res->dev);
	}
	mutex_unlock(&wcd9xxx_res->pm_lock);
	wake_up_all(&wcd9xxx_res->pm_wq);