Lines Matching defs:otg
20 #include <linux/usb/otg.h>
98 if (!gpio_vbus->phy.otg->gadget)
114 gpio_vbus->phy.otg->state = OTG_STATE_B_PERIPHERAL;
116 usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget);
126 status, gpio_vbus->phy.otg->gadget);
135 usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget);
137 gpio_vbus->phy.otg->state = OTG_STATE_B_IDLE;
141 status, gpio_vbus->phy.otg->gadget);
151 struct usb_otg *otg = gpio_vbus->phy.otg;
155 otg->gadget ? otg->gadget->name : "none");
157 if (otg->gadget)
166 static int gpio_vbus_set_peripheral(struct usb_otg *otg,
172 gpio_vbus = container_of(otg->usb_phy, struct gpio_vbus_data, phy);
177 otg->gadget->name);
185 usb_gadget_vbus_disconnect(otg->gadget);
186 otg->state = OTG_STATE_UNDEFINED;
188 otg->gadget = NULL;
192 otg->gadget = gadget;
208 if (phy->otg->state == OTG_STATE_B_PERIPHERAL)
244 gpio_vbus->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg),
246 if (!gpio_vbus->phy.otg)
256 gpio_vbus->phy.otg->state = OTG_STATE_UNDEFINED;
257 gpio_vbus->phy.otg->usb_phy = &gpio_vbus->phy;
258 gpio_vbus->phy.otg->set_peripheral = gpio_vbus_set_peripheral;