Lines Matching full:otg

18 #include <linux/usb/otg.h>
110 struct usb_otg *otg = nop->phy.otg; in nop_gpio_vbus_thread() local
120 otg->state = OTG_STATE_B_PERIPHERAL; in nop_gpio_vbus_thread()
123 /* drawing a "unit load" is *always* OK, except for OTG */ in nop_gpio_vbus_thread()
127 otg->gadget); in nop_gpio_vbus_thread()
132 otg->state = OTG_STATE_B_IDLE; in nop_gpio_vbus_thread()
136 otg->gadget); in nop_gpio_vbus_thread()
179 static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget) in nop_set_peripheral() argument
181 if (!otg) in nop_set_peripheral()
185 otg->gadget = NULL; in nop_set_peripheral()
189 otg->gadget = gadget; in nop_set_peripheral()
190 if (otg->state == OTG_STATE_B_PERIPHERAL) in nop_set_peripheral()
191 atomic_notifier_call_chain(&otg->usb_phy->notifier, in nop_set_peripheral()
192 USB_EVENT_VBUS, otg->gadget); in nop_set_peripheral()
194 otg->state = OTG_STATE_B_IDLE; in nop_set_peripheral()
198 static int nop_set_host(struct usb_otg *otg, struct usb_bus *host) in nop_set_host() argument
200 if (!otg) in nop_set_host()
204 otg->host = NULL; in nop_set_host()
208 otg->host = host; in nop_set_host()
244 nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg), in usb_phy_gen_create_phy()
246 if (!nop->phy.otg) in usb_phy_gen_create_phy()
283 nop->phy.otg->state = OTG_STATE_UNDEFINED; in usb_phy_gen_create_phy()
284 nop->phy.otg->usb_phy = &nop->phy; in usb_phy_gen_create_phy()
285 nop->phy.otg->set_host = nop_set_host; in usb_phy_gen_create_phy()
286 nop->phy.otg->set_peripheral = nop_set_peripheral; in usb_phy_gen_create_phy()
317 nop->phy.otg->state = gpiod_get_value(nop->gpiod_vbus) ? in usb_phy_generic_probe()