/* called from irq handlers */ static void b_idle(struct isp1301 *isp, const char *tag) { if (isp->otg.state == OTG_STATE_B_IDLE) return; isp->otg.default_a = 0; if (isp->otg.host) { isp->otg.host->is_b_host = 1; host_suspend(isp); } if (isp->otg.gadget) { isp->otg.gadget->is_a_peripheral = 0; gadget_suspend(isp); } isp->otg.state = OTG_STATE_B_IDLE; isp->last_otg_ctrl = OTG_CTRL_REG = OTG_CTRL_REG & OTG_XCEIV_OUTPUTS; pr_debug(" --> %s/%s\n", state_name(isp), tag); }
/* called from irq handlers */ static void a_idle(struct isp1301 *isp, const char *tag) { u32 l; if (isp->otg.state == OTG_STATE_A_IDLE) return; isp->otg.default_a = 1; if (isp->otg.host) { isp->otg.host->is_b_host = 0; host_suspend(isp); } if (isp->otg.gadget) { isp->otg.gadget->is_a_peripheral = 1; gadget_suspend(isp); } isp->otg.state = OTG_STATE_A_IDLE; l = omap_readl(OTG_CTRL) & OTG_XCEIV_OUTPUTS; omap_writel(l, OTG_CTRL); isp->last_otg_ctrl = l; pr_debug(" --> %s/%s\n", state_name(isp), tag); }