Currently if remove controller driver while vbus is on, vbus turn off
is missing, thus next time loading controller driver will turn on vbus
again but will not generate AVV irq, finally otg fsm state is mess and
cannot work as host correctly.
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit
c810ab9697dd912ba2a928659879ace188d31c10)
void ci_hdrc_otg_fsm_remove(struct ci_hdrc *ci)
{
+ /* Turn off vbus if vbus is on */
+ if (ci->fsm.a_vbus_vld)
+ otg_drv_vbus(&ci->fsm, 0);
+
sysfs_remove_group(&ci->dev->kobj, &inputs_attr_group);
}