Lines Matching refs:otg

104 	struct usb_otg *otg = nop->phy.otg;  in nop_gpio_vbus_thread()  local
114 otg->state = OTG_STATE_B_PERIPHERAL; in nop_gpio_vbus_thread()
121 otg->gadget); in nop_gpio_vbus_thread()
126 otg->state = OTG_STATE_B_IDLE; in nop_gpio_vbus_thread()
130 otg->gadget); in nop_gpio_vbus_thread()
173 static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) in nop_set_peripheral() argument
175 if (!otg) in nop_set_peripheral()
179 otg->gadget = NULL; in nop_set_peripheral()
183 otg->gadget = gadget; in nop_set_peripheral()
184 if (otg->state == OTG_STATE_B_PERIPHERAL) in nop_set_peripheral()
185 atomic_notifier_call_chain(&otg->usb_phy->notifier, in nop_set_peripheral()
186 USB_EVENT_VBUS, otg->gadget); in nop_set_peripheral()
188 otg->state = OTG_STATE_B_IDLE; in nop_set_peripheral()
192 static int nop_set_host(struct usb_otg *otg, struct usb_bus *host) in nop_set_host() argument
194 if (!otg) in nop_set_host()
198 otg->host = NULL; in nop_set_host()
202 otg->host = host; in nop_set_host()
238 nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg), in usb_phy_gen_create_phy()
240 if (!nop->phy.otg) in usb_phy_gen_create_phy()
277 nop->phy.otg->state = OTG_STATE_UNDEFINED; in usb_phy_gen_create_phy()
278 nop->phy.otg->usb_phy = &nop->phy; in usb_phy_gen_create_phy()
279 nop->phy.otg->set_host = nop_set_host; in usb_phy_gen_create_phy()
280 nop->phy.otg->set_peripheral = nop_set_peripheral; in usb_phy_gen_create_phy()
311 nop->phy.otg->state = gpiod_get_value(nop->gpiod_vbus) ? in usb_phy_generic_probe()