• Home
  • Raw
  • Download

Lines Matching refs:otg

237 	return usb_otg_state_string(isp->phy.otg->state);  in state_name()
252 isp->phy.otg->state = OTG_STATE_UNDEFINED; in power_down()
281 if (!isp->phy.otg->host) in host_suspend()
287 dev = isp->phy.otg->host->controller; in host_suspend()
299 if (!isp->phy.otg->host) in host_resume()
302 dev = isp->phy.otg->host->controller; in host_resume()
309 isp->phy.otg->gadget->b_hnp_enable = 0; in gadget_suspend()
310 isp->phy.otg->gadget->a_hnp_support = 0; in gadget_suspend()
311 isp->phy.otg->gadget->a_alt_hnp_support = 0; in gadget_suspend()
312 return usb_gadget_vbus_disconnect(isp->phy.otg->gadget); in gadget_suspend()
342 if (isp->phy.otg->state == OTG_STATE_A_IDLE) in a_idle()
345 isp->phy.otg->default_a = 1; in a_idle()
346 if (isp->phy.otg->host) { in a_idle()
347 isp->phy.otg->host->is_b_host = 0; in a_idle()
350 if (isp->phy.otg->gadget) { in a_idle()
351 isp->phy.otg->gadget->is_a_peripheral = 1; in a_idle()
354 isp->phy.otg->state = OTG_STATE_A_IDLE; in a_idle()
366 if (isp->phy.otg->state == OTG_STATE_B_IDLE) in b_idle()
369 isp->phy.otg->default_a = 0; in b_idle()
370 if (isp->phy.otg->host) { in b_idle()
371 isp->phy.otg->host->is_b_host = 1; in b_idle()
374 if (isp->phy.otg->gadget) { in b_idle()
375 isp->phy.otg->gadget->is_a_peripheral = 0; in b_idle()
378 isp->phy.otg->state = OTG_STATE_B_IDLE; in b_idle()
477 if (isp->phy.otg->state == state && !extra) in check_state()
501 else if (isp->phy.otg->state == OTG_STATE_A_WAIT_VFALL) { in update_otg1()
508 if (isp->phy.otg->state == OTG_STATE_B_IDLE in update_otg1()
509 || isp->phy.otg->state in update_otg1()
516 if (isp->phy.otg->state == OTG_STATE_A_IDLE in update_otg1()
517 || isp->phy.otg->state == OTG_STATE_UNDEFINED) { in update_otg1()
551 switch (isp->phy.otg->state) { in otg_update_isp()
557 if (isp->phy.otg->gadget->b_hnp_enable) { in otg_update_isp()
558 isp->phy.otg->state = OTG_STATE_B_WAIT_ACON; in otg_update_isp()
585 if (!(isp->phy.otg->host)) in otg_update_isp()
588 switch (isp->phy.otg->state) { in otg_update_isp()
599 isp->phy.otg->state = OTG_STATE_A_WAIT_VFALL; in otg_update_isp()
608 isp->phy.otg->state = OTG_STATE_A_WAIT_VRISE; in otg_update_isp()
628 switch (isp->phy.otg->state) { in otg_update_isp()
632 isp->phy.otg->state = OTG_STATE_B_PERIPHERAL; in otg_update_isp()
638 isp->phy.otg->state = OTG_STATE_A_PERIPHERAL; in otg_update_isp()
659 struct usb_otg *otg = isp->phy.otg; in omap_otg_irq() local
676 if (isp->phy.otg->state == OTG_STATE_B_SRP_INIT) in omap_otg_irq()
694 isp->phy.otg->state = OTG_STATE_B_PERIPHERAL; in omap_otg_irq()
706 switch (isp->phy.otg->state) { in omap_otg_irq()
708 if (!otg->host) in omap_otg_irq()
737 isp->phy.otg->state = OTG_STATE_A_WAIT_VFALL; in omap_otg_irq()
751 isp->phy.otg->state = OTG_STATE_A_VBUS_ERR; in omap_otg_irq()
772 switch (isp->phy.otg->state) { in omap_otg_irq()
788 if (otg->host) { in omap_otg_irq()
789 switch (isp->phy.otg->state) { in omap_otg_irq()
791 isp->phy.otg->state = OTG_STATE_B_HOST; in omap_otg_irq()
796 isp->phy.otg->state = OTG_STATE_A_HOST; in omap_otg_irq()
800 isp->phy.otg->state = OTG_STATE_A_WAIT_BCON; in omap_otg_irq()
814 usb_bus_start_enum(otg->host, otg->host->otg_port); in omap_otg_irq()
929 usb_gadget_vbus_connect(isp->phy.otg->gadget); in b_peripheral()
939 isp->phy.otg->state = OTG_STATE_B_PERIPHERAL; in b_peripheral()
947 struct usb_otg *otg = isp->phy.otg; in isp_update_otg() local
949 enum usb_otg_state state = isp->phy.otg->state; in isp_update_otg()
957 if (otg->default_a) { in isp_update_otg()
972 isp->phy.otg->state = OTG_STATE_A_HOST; in isp_update_otg()
980 isp->phy.otg->state = OTG_STATE_A_VBUS_ERR; in isp_update_otg()
989 usb_gadget_vbus_disconnect(otg->gadget); in isp_update_otg()
996 if (otg->host && state == OTG_STATE_A_IDLE) in isp_update_otg()
1006 if (otg->default_a) { in isp_update_otg()
1009 isp->phy.otg->state = OTG_STATE_A_WAIT_VFALL; in isp_update_otg()
1022 isp->phy.otg->state = OTG_STATE_B_IDLE; in isp_update_otg()
1033 switch (isp->phy.otg->state) { in isp_update_otg()
1055 if (otg->gadget && (isp_bstat & OTG_B_SESS_VLD)) { in isp_update_otg()
1073 if (state != isp->phy.otg->state) in isp_update_otg()
1131 switch (isp->phy.otg->state) { in isp1301_work()
1134 isp->phy.otg->state = OTG_STATE_A_HOST; in isp1301_work()
1143 isp->phy.otg->state = OTG_STATE_B_HOST; in isp1301_work()
1204 kfree(isp->phy.otg); in isp1301_release()
1275 isp1301_set_host(struct usb_otg *otg, struct usb_bus *host) in isp1301_set_host() argument
1277 struct isp1301 *isp = container_of(otg->usb_phy, struct isp1301, phy); in isp1301_set_host()
1285 otg->host = NULL; in isp1301_set_host()
1290 otg->host = host; in isp1301_set_host()
1293 if (otg->gadget) in isp1301_set_host()
1299 otg->host = host; in isp1301_set_host()
1331 isp1301_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) in isp1301_set_peripheral() argument
1333 struct isp1301 *isp = container_of(otg->usb_phy, struct isp1301, phy); in isp1301_set_peripheral()
1340 if (!otg->default_a) in isp1301_set_peripheral()
1342 usb_gadget_vbus_disconnect(otg->gadget); in isp1301_set_peripheral()
1343 otg->gadget = NULL; in isp1301_set_peripheral()
1349 otg->gadget = gadget; in isp1301_set_peripheral()
1352 if (otg->host) in isp1301_set_peripheral()
1357 otg->gadget = gadget; in isp1301_set_peripheral()
1370 isp->phy.otg->state = OTG_STATE_B_IDLE; in isp1301_set_peripheral()
1405 if (dev->otg->state == OTG_STATE_B_PERIPHERAL) in isp1301_set_power()
1411 isp1301_start_srp(struct usb_otg *otg) in isp1301_start_srp() argument
1413 struct isp1301 *isp = container_of(otg->usb_phy, struct isp1301, phy); in isp1301_start_srp()
1416 if (isp != the_transceiver || isp->phy.otg->state != OTG_STATE_B_IDLE) in isp1301_start_srp()
1426 isp->phy.otg->state = OTG_STATE_B_SRP_INIT; in isp1301_start_srp()
1437 isp1301_start_hnp(struct usb_otg *otg) in isp1301_start_hnp() argument
1440 struct isp1301 *isp = container_of(otg->usb_phy, struct isp1301, phy); in isp1301_start_hnp()
1445 if (otg->default_a && (otg->host == NULL || !otg->host->b_hnp_enable)) in isp1301_start_hnp()
1447 if (!otg->default_a && (otg->gadget == NULL in isp1301_start_hnp()
1448 || !otg->gadget->b_hnp_enable)) in isp1301_start_hnp()
1454 switch (isp->phy.otg->state) { in isp1301_start_hnp()
1456 isp->phy.otg->state = OTG_STATE_B_PERIPHERAL; in isp1301_start_hnp()
1466 usb_gadget_vbus_connect(otg->gadget); in isp1301_start_hnp()
1503 isp->phy.otg = kzalloc(sizeof *isp->phy.otg, GFP_KERNEL); in isp1301_probe()
1504 if (!isp->phy.otg) { in isp1301_probe()
1585 isp->phy.otg->usb_phy = &isp->phy; in isp1301_probe()
1586 isp->phy.otg->set_host = isp1301_set_host, in isp1301_probe()
1587 isp->phy.otg->set_peripheral = isp1301_set_peripheral, in isp1301_probe()
1588 isp->phy.otg->start_srp = isp1301_start_srp, in isp1301_probe()
1589 isp->phy.otg->start_hnp = isp1301_start_hnp, in isp1301_probe()
1615 kfree(isp->phy.otg); in isp1301_probe()