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

Commit da08f2f3 authored by Meng Wang's avatar Meng Wang Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: wcd934x: 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.

Change-Id: I724ffe6e3547655424238ca02a9bf8ac24b101fe
Signed-off-by: default avatarMeng Wang <mengw@codeaurora.org>
parent 4cc52a2b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -9002,8 +9002,10 @@ static int tavil_dig_core_power_collapse(struct tavil_priv *tavil,
		goto unlock_mutex;

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