Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8239dcc authored by Bin Liu's avatar Bin Liu Committed by Felipe Balbi
Browse files

usb: musb: dsps: fix polling in device-only mode



Fix the regression caused by commit ad78c918 ("usb: musb: dsps: just
start polling already") which causes polling the ID pin status even in
device-only mode.

Fixes: ad78c918 ("usb: musb: dsps: just start polling already")
Signed-off-by: default avatarBin Liu <b-liu@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent cf261fd1
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -225,8 +225,11 @@ static void dsps_musb_enable(struct musb *musb)

	dsps_writel(reg_base, wrp->epintr_set, epmask);
	dsps_writel(reg_base, wrp->coreintr_set, coremask);
	/* start polling for ID change. */
	mod_timer(&glue->timer, jiffies + msecs_to_jiffies(wrp->poll_timeout));
	/* start polling for ID change in dual-role idle mode */
	if (musb->xceiv->otg->state == OTG_STATE_B_IDLE &&
			musb->port_mode == MUSB_PORT_MODE_DUAL_ROLE)
		mod_timer(&glue->timer, jiffies +
				msecs_to_jiffies(wrp->poll_timeout));
	dsps_musb_try_idle(musb, 0);
}