Merge "USB: phy-msm: Enable core/async irq only for host/device bus suspend"

This commit is contained in:
Linux Build Service Account 2016-07-05 14:56:35 -07:00 committed by Gerrit - the friendly Code Review server
commit 8a6a5e2e37
2 changed files with 21 additions and 10 deletions

View file

@ -756,16 +756,23 @@ static void ipa_rx_switch_to_intr_mode(struct ipa_sys_context *sys)
{
int ret;
if (!atomic_read(&sys->curr_polling_state)) {
IPAERR("already in intr mode\n");
goto fail;
}
ret = sps_get_config(sys->ep->ep_hdl, &sys->ep->connect);
if (ret) {
IPAERR("sps_get_config() failed %d\n", ret);
goto fail;
}
if (!atomic_read(&sys->curr_polling_state) &&
((sys->ep->connect.options & SPS_O_EOT) == SPS_O_EOT)) {
IPADBG("already in intr mode\n");
return;
}
if (!atomic_read(&sys->curr_polling_state)) {
IPAERR("Not in poll mode, and IRQ not enabled.\n");
goto fail;
}
sys->event.options = SPS_O_EOT;
ret = sps_register_event(sys->ep->ep_hdl, &sys->event);
if (ret) {

View file

@ -1690,12 +1690,14 @@ phcd_retry:
atomic_set(&motg->in_lpm, 1);
wake_up(&motg->host_suspend_wait);
/* Enable ASYNC IRQ during LPM */
enable_irq(motg->async_irq);
if (host_bus_suspend || device_bus_suspend) {
/* Enable ASYNC IRQ during LPM */
enable_irq(motg->async_irq);
enable_irq(motg->irq);
}
if (motg->phy_irq)
enable_irq(motg->phy_irq);
enable_irq(motg->irq);
wake_unlock(&motg->wlock);
dev_dbg(phy->dev, "LPM caps = %lu flags = %lu\n",
@ -1744,7 +1746,8 @@ static int msm_otg_resume(struct msm_otg *motg)
msm_bam_notify_lpm_resume(CI_CTRL);
disable_irq(motg->irq);
if (motg->host_bus_suspend || motg->device_bus_suspend)
disable_irq(motg->irq);
wake_lock(&motg->wlock);
/*
@ -1903,7 +1906,8 @@ skip_phy_resume:
enable_irq(motg->irq);
/* Enable ASYNC_IRQ only during LPM */
disable_irq(motg->async_irq);
if (motg->host_bus_suspend || motg->device_bus_suspend)
disable_irq(motg->async_irq);
if (motg->phy_irq_pending) {
motg->phy_irq_pending = false;