Lines Matching full:otg
18 #include <linux/usb/otg.h>
104 struct usb_otg *otg = nop->phy.otg;
114 otg->state = OTG_STATE_B_PERIPHERAL;
117 /* drawing a "unit load" is *always* OK, except for OTG */
121 otg->gadget);
126 otg->state = OTG_STATE_B_IDLE;
130 otg->gadget);
173 static int nop_set_peripheral(struct usb_otg *otg, struct usb_gadget *gadget)
175 if (!otg)
179 otg->gadget = NULL;
183 otg->gadget = gadget;
184 if (otg->state == OTG_STATE_B_PERIPHERAL)
185 atomic_notifier_call_chain(&otg->usb_phy->notifier,
186 USB_EVENT_VBUS, otg->gadget);
188 otg->state = OTG_STATE_B_IDLE;
192 static int nop_set_host(struct usb_otg *otg, struct usb_bus *host)
194 if (!otg)
198 otg->host = NULL;
202 otg->host = host;
238 nop->phy.otg = devm_kzalloc(dev, sizeof(*nop->phy.otg),
240 if (!nop->phy.otg)
277 nop->phy.otg->state = OTG_STATE_UNDEFINED;
278 nop->phy.otg->usb_phy = &nop->phy;
279 nop->phy.otg->set_host = nop_set_host;
280 nop->phy.otg->set_peripheral = nop_set_peripheral;
311 nop->phy.otg->state = gpiod_get_value(nop->gpiod_vbus) ?