Merge "Revert "soc:soundwire: disable pm_qos in soundwire master driver""
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
0f7704bd0e
@@ -2854,6 +2854,9 @@ static int swrm_probe(struct platform_device *pdev)
|
||||
swrm->wlock_holders = 0;
|
||||
swrm->pm_state = SWRM_PM_SLEEPABLE;
|
||||
init_waitqueue_head(&swrm->pm_wq);
|
||||
cpu_latency_qos_add_request(&swrm->pm_qos_req,
|
||||
PM_QOS_DEFAULT_VALUE);
|
||||
|
||||
for (i = 0 ; i < SWR_MSTR_PORT_LEN; i++) {
|
||||
INIT_LIST_HEAD(&swrm->mport_cfg[i].port_req_list);
|
||||
|
||||
@@ -3062,6 +3065,7 @@ err_irq_fail:
|
||||
mutex_destroy(&swrm->clklock);
|
||||
mutex_destroy(&swrm->pm_lock);
|
||||
mutex_destroy(&swrm->runtime_lock);
|
||||
cpu_latency_qos_remove_request(&swrm->pm_qos_req);
|
||||
|
||||
err_pdata_fail:
|
||||
err_memory_fail:
|
||||
@@ -3100,6 +3104,7 @@ static int swrm_remove(struct platform_device *pdev)
|
||||
mutex_destroy(&swrm->force_down_lock);
|
||||
mutex_destroy(&swrm->pm_lock);
|
||||
mutex_destroy(&swrm->runtime_lock);
|
||||
cpu_latency_qos_remove_request(&swrm->pm_qos_req);
|
||||
devm_kfree(&pdev->dev, swrm);
|
||||
return 0;
|
||||
}
|
||||
@@ -3799,6 +3804,8 @@ static bool swrm_lock_sleep(struct swr_mstr_ctrl *swrm)
|
||||
mutex_lock(&swrm->pm_lock);
|
||||
if (swrm->wlock_holders++ == 0) {
|
||||
dev_dbg(swrm->dev, "%s: holding wake lock\n", __func__);
|
||||
cpu_latency_qos_update_request(&swrm->pm_qos_req,
|
||||
CPU_IDLE_LATENCY);
|
||||
pm_stay_awake(swrm->dev);
|
||||
}
|
||||
mutex_unlock(&swrm->pm_lock);
|
||||
@@ -3833,6 +3840,8 @@ static void swrm_unlock_sleep(struct swr_mstr_ctrl *swrm)
|
||||
*/
|
||||
if (likely(swrm->pm_state == SWRM_PM_AWAKE))
|
||||
swrm->pm_state = SWRM_PM_SLEEPABLE;
|
||||
cpu_latency_qos_update_request(&swrm->pm_qos_req,
|
||||
PM_QOS_DEFAULT_VALUE);
|
||||
pm_relax(swrm->dev);
|
||||
}
|
||||
mutex_unlock(&swrm->pm_lock);
|
||||
|
Reference in New Issue
Block a user