Lines Matching refs:otg

98 	if (!gpio_vbus->phy.otg->gadget)  in gpio_vbus_work()
114 gpio_vbus->phy.otg->state = OTG_STATE_B_PERIPHERAL; in gpio_vbus_work()
116 usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
126 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
135 usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
137 gpio_vbus->phy.otg->state = OTG_STATE_B_IDLE; in gpio_vbus_work()
141 status, gpio_vbus->phy.otg->gadget); in gpio_vbus_work()
151 struct usb_otg *otg = gpio_vbus->phy.otg; in gpio_vbus_irq() local
155 otg->gadget ? otg->gadget->name : "none"); in gpio_vbus_irq()
157 if (otg->gadget) in gpio_vbus_irq()
166 static int gpio_vbus_set_peripheral(struct usb_otg *otg, in gpio_vbus_set_peripheral() argument
172 gpio_vbus = container_of(otg->usb_phy, struct gpio_vbus_data, phy); in gpio_vbus_set_peripheral()
177 otg->gadget->name); in gpio_vbus_set_peripheral()
185 usb_gadget_vbus_disconnect(otg->gadget); in gpio_vbus_set_peripheral()
186 otg->state = OTG_STATE_UNDEFINED; in gpio_vbus_set_peripheral()
188 otg->gadget = NULL; in gpio_vbus_set_peripheral()
192 otg->gadget = gadget; in gpio_vbus_set_peripheral()
208 if (phy->otg->state == OTG_STATE_B_PERIPHERAL) in gpio_vbus_set_power()
244 gpio_vbus->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg), in gpio_vbus_probe()
246 if (!gpio_vbus->phy.otg) in gpio_vbus_probe()
256 gpio_vbus->phy.otg->state = OTG_STATE_UNDEFINED; in gpio_vbus_probe()
257 gpio_vbus->phy.otg->usb_phy = &gpio_vbus->phy; in gpio_vbus_probe()
258 gpio_vbus->phy.otg->set_peripheral = gpio_vbus_set_peripheral; in gpio_vbus_probe()