Lines Matching refs:otg
109 struct usb_otg *otg = nop->phy.otg; in nop_gpio_vbus_thread() local
119 otg->state = OTG_STATE_B_PERIPHERAL; in nop_gpio_vbus_thread()
121 usb_gadget_vbus_connect(otg->gadget); in nop_gpio_vbus_thread()
127 otg->gadget); in nop_gpio_vbus_thread()
131 usb_gadget_vbus_disconnect(otg->gadget); in nop_gpio_vbus_thread()
133 otg->state = OTG_STATE_B_IDLE; in nop_gpio_vbus_thread()
137 otg->gadget); in nop_gpio_vbus_thread()
176 static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) in nop_set_peripheral() argument
178 if (!otg) in nop_set_peripheral()
182 otg->gadget = NULL; in nop_set_peripheral()
186 otg->gadget = gadget; in nop_set_peripheral()
187 otg->state = OTG_STATE_B_IDLE; in nop_set_peripheral()
191 static int nop_set_host(struct usb_otg *otg, struct usb_bus *host) in nop_set_host() argument
193 if (!otg) in nop_set_host()
197 otg->host = NULL; in nop_set_host()
201 otg->host = host; in nop_set_host()
252 nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg), in usb_phy_gen_create_phy()
254 if (!nop->phy.otg) in usb_phy_gen_create_phy()
285 nop->phy.otg->state = OTG_STATE_UNDEFINED; in usb_phy_gen_create_phy()
286 nop->phy.otg->usb_phy = &nop->phy; in usb_phy_gen_create_phy()
287 nop->phy.otg->set_host = nop_set_host; in usb_phy_gen_create_phy()
288 nop->phy.otg->set_peripheral = nop_set_peripheral; in usb_phy_gen_create_phy()