msm_serial_hs: Change GPIO config sequence during runtime resume/suspend
In runtime resume scenarios we first enable the HW resources, clocks and then set the gpio to UART functionalities. When GPIOS are changing the state RX line samples as zero resulting in RX Break detection. This stops data coming from BT SOC sending to the BT host causing failures. Modify the GPIO config sequence such that GPIO functionalities changed only when resources like Clocks are OFF. Change-Id: Iaf3b7c7a66dd83fc631e4a779a804ef98836e00b Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
This commit is contained in:
parent
4166896b94
commit
d7aebcc75c
1 changed files with 15 additions and 13 deletions
|
@ -3155,6 +3155,11 @@ static void msm_hs_pm_suspend(struct device *dev)
|
|||
mutex_lock(&msm_uport->mtx);
|
||||
|
||||
client_count = atomic_read(&msm_uport->client_count);
|
||||
msm_uport->pm_state = MSM_HS_PM_SUSPENDED;
|
||||
msm_hs_resource_off(msm_uport);
|
||||
obs_manage_irq(msm_uport, false);
|
||||
msm_hs_clk_bus_unvote(msm_uport);
|
||||
|
||||
/* For OBS, don't use wakeup interrupt, set gpio to suspended state */
|
||||
if (msm_uport->obs) {
|
||||
ret = pinctrl_select_state(msm_uport->pinctrl,
|
||||
|
@ -3164,10 +3169,6 @@ static void msm_hs_pm_suspend(struct device *dev)
|
|||
__func__);
|
||||
}
|
||||
|
||||
msm_uport->pm_state = MSM_HS_PM_SUSPENDED;
|
||||
msm_hs_resource_off(msm_uport);
|
||||
obs_manage_irq(msm_uport, false);
|
||||
msm_hs_clk_bus_unvote(msm_uport);
|
||||
if (!atomic_read(&msm_uport->client_req_state))
|
||||
enable_wakeup_interrupt(msm_uport);
|
||||
LOG_USR_MSG(msm_uport->ipc_msm_hs_pwr_ctxt,
|
||||
|
@ -3198,15 +3199,6 @@ static int msm_hs_pm_resume(struct device *dev)
|
|||
goto exit_pm_resume;
|
||||
if (!atomic_read(&msm_uport->client_req_state))
|
||||
disable_wakeup_interrupt(msm_uport);
|
||||
ret = msm_hs_clk_bus_vote(msm_uport);
|
||||
if (ret) {
|
||||
MSM_HS_ERR("%s:Failed clock vote %d\n", __func__, ret);
|
||||
dev_err(dev, "%s:Failed clock vote %d\n", __func__, ret);
|
||||
goto exit_pm_resume;
|
||||
}
|
||||
obs_manage_irq(msm_uport, true);
|
||||
msm_uport->pm_state = MSM_HS_PM_ACTIVE;
|
||||
msm_hs_resource_on(msm_uport);
|
||||
|
||||
/* For OBS, don't use wakeup interrupt, set gpio to active state */
|
||||
if (msm_uport->obs) {
|
||||
|
@ -3217,6 +3209,16 @@ static int msm_hs_pm_resume(struct device *dev)
|
|||
__func__);
|
||||
}
|
||||
|
||||
ret = msm_hs_clk_bus_vote(msm_uport);
|
||||
if (ret) {
|
||||
MSM_HS_ERR("%s:Failed clock vote %d\n", __func__, ret);
|
||||
dev_err(dev, "%s:Failed clock vote %d\n", __func__, ret);
|
||||
goto exit_pm_resume;
|
||||
}
|
||||
obs_manage_irq(msm_uport, true);
|
||||
msm_uport->pm_state = MSM_HS_PM_ACTIVE;
|
||||
msm_hs_resource_on(msm_uport);
|
||||
|
||||
LOG_USR_MSG(msm_uport->ipc_msm_hs_pwr_ctxt,
|
||||
"%s:PM State:Active client_count %d\n", __func__, client_count);
|
||||
exit_pm_resume:
|
||||
|
|
Loading…
Add table
Reference in a new issue