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

Commit 21472bb1 authored by Rohit Kumar's avatar Rohit Kumar Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: wcd9335: Reset power_active_ref to 0 when it is negative



Reset power_active_ref counter to 0 when it is negative to
take digital core out of reset during next session.

CRs-Fixed: 2054140
Change-Id: I4ca4c465e7d15f8a0ccd0546db7b0cc5c6ea701e
Signed-off-by: default avatarRohit Kumar <rohitkr@codeaurora.org>
parent a25d7287
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -12110,8 +12110,10 @@ static int tasha_dig_core_power_collapse(struct tasha_priv *tasha,
		goto unlock_mutex;

	if (tasha->power_active_ref < 0) {
		dev_dbg(tasha->dev, "%s: power_active_ref is negative\n",
		dev_info(tasha->dev,
			"%s: power_active_ref is negative, resetting it\n",
			__func__);
		tasha->power_active_ref = 0;
		goto unlock_mutex;
	}