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

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

Merge "ASoC: wcd: update mbhc driver to release pm wake lock"

parents 34f65d6f ee8ba82e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -324,6 +324,8 @@ bool wcd9xxx_spmi_lock_sleep()
				      msm_cpuidle_get_deep_idle_latency());
	}
	mutex_unlock(&map.pm_lock);
	pr_debug("%s: wake lock counter %d\n", __func__,
			map.wlock_holders);

	if (!wait_event_timeout(map.pm_wq,
				((wcd9xxx_spmi_pm_cmpxchg(
@@ -364,6 +366,8 @@ void wcd9xxx_spmi_unlock_sleep()
				PM_QOS_DEFAULT_VALUE);
	}
	mutex_unlock(&map.pm_lock);
	pr_debug("%s: wake lock counter %d\n", __func__,
			map.wlock_holders);
	wake_up_all(&map.pm_wq);
}
EXPORT_SYMBOL(wcd9xxx_spmi_unlock_sleep);
+5 −3
Original line number Diff line number Diff line
@@ -579,7 +579,7 @@ static void wcd_correct_swch_plug(struct work_struct *work)
	while (!time_after(jiffies, timeout)) {
		if (mbhc->hs_detect_work_stop) {
			pr_debug("%s: stop requested\n", __func__);
			return;
			goto exit;
		}

		/*
@@ -590,7 +590,7 @@ static void wcd_correct_swch_plug(struct work_struct *work)
		msleep(200);
		if (mbhc->hs_detect_work_stop) {
			pr_debug("%s: stop requested\n", __func__);
			return;
			goto exit;
		}
		result1 = snd_soc_read(codec,
				 MSM8X16_WCD_A_ANALOG_MBHC_BTN_RESULT);
@@ -605,7 +605,7 @@ static void wcd_correct_swch_plug(struct work_struct *work)
			plug_type = MBHC_PLUG_TYPE_HEADSET;
			if (mbhc->current_plug != MBHC_PLUG_TYPE_HEADSET) {
				wcd_mbhc_find_plug_and_report(mbhc, plug_type);
				return;
				goto exit;
			}
			wrk_complete = false;
		}
@@ -689,6 +689,8 @@ static void wcd_correct_swch_plug(struct work_struct *work)
	}

	wcd_mbhc_find_plug_and_report(mbhc, plug_type);
exit:
	wcd9xxx_spmi_unlock_sleep();
	pr_debug("%s: leave\n", __func__);
}