Lines Matching refs:otg

107 	if (!gpio_vbus->phy.otg->gadget)  in gpio_vbus_work()
124 gpio_vbus->phy.otg->state = OTG_STATE_B_PERIPHERAL; in gpio_vbus_work()
126 usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
136 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
145 usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
147 gpio_vbus->phy.otg->state = OTG_STATE_B_IDLE; in gpio_vbus_work()
151 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
162 struct usb_otg *otg = gpio_vbus->phy.otg; in gpio_vbus_irq() local
166 otg->gadget ? otg->gadget->name : "none"); in gpio_vbus_irq()
168 if (otg->gadget) in gpio_vbus_irq()
177 static int gpio_vbus_set_peripheral(struct usb_otg *otg, in gpio_vbus_set_peripheral() argument
185 gpio_vbus = container_of(otg->usb_phy, struct gpio_vbus_data, phy); in gpio_vbus_set_peripheral()
192 otg->gadget->name); in gpio_vbus_set_peripheral()
200 usb_gadget_vbus_disconnect(otg->gadget); in gpio_vbus_set_peripheral()
201 otg->state = OTG_STATE_UNDEFINED; in gpio_vbus_set_peripheral()
203 otg->gadget = NULL; in gpio_vbus_set_peripheral()
207 otg->gadget = gadget; in gpio_vbus_set_peripheral()
223 if (phy->otg->state == OTG_STATE_B_PERIPHERAL) in gpio_vbus_set_power()
263 gpio_vbus->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg), in gpio_vbus_probe()
265 if (!gpio_vbus->phy.otg) in gpio_vbus_probe()
275 gpio_vbus->phy.otg->state = OTG_STATE_UNDEFINED; in gpio_vbus_probe()
276 gpio_vbus->phy.otg->usb_phy = &gpio_vbus->phy; in gpio_vbus_probe()
277 gpio_vbus->phy.otg->set_peripheral = gpio_vbus_set_peripheral; in gpio_vbus_probe()