mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-23 12:10:29 +00:00
Merge "ASoC: wcd: update mbhc driver to release pm wake lock"
This commit is contained in:
commit
3a1d2bde49
@ -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);
|
||||
|
@ -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__);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user