Lines Matching refs:udc

927 static int pullup(struct pxa25x_udc *udc)  in pullup()  argument
929 int is_active = udc->vbus && udc->pullup && !udc->suspended; in pullup()
932 if (!udc->active) { in pullup()
933 udc->active = 1; in pullup()
935 clk_enable(udc->clk); in pullup()
936 udc_enable(udc); in pullup()
939 if (udc->active) { in pullup()
940 if (udc->gadget.speed != USB_SPEED_UNKNOWN) { in pullup()
941 DMSG("disconnect %s\n", udc->driver in pullup()
942 ? udc->driver->driver.name in pullup()
944 stop_activity(udc, udc->driver); in pullup()
946 udc_disable(udc); in pullup()
948 clk_disable(udc->clk); in pullup()
949 udc->active = 0; in pullup()
959 struct pxa25x_udc *udc; in pxa25x_udc_vbus_session() local
961 udc = container_of(_gadget, struct pxa25x_udc, gadget); in pxa25x_udc_vbus_session()
962 udc->vbus = is_active; in pxa25x_udc_vbus_session()
964 pullup(udc); in pxa25x_udc_vbus_session()
971 struct pxa25x_udc *udc; in pxa25x_udc_pullup() local
973 udc = container_of(_gadget, struct pxa25x_udc, gadget); in pxa25x_udc_pullup()
976 if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command) in pxa25x_udc_pullup()
979 udc->pullup = (is_active != 0); in pxa25x_udc_pullup()
980 pullup(udc); in pxa25x_udc_pullup()
990 struct pxa25x_udc *udc; in pxa25x_udc_vbus_draw() local
992 udc = container_of(_gadget, struct pxa25x_udc, gadget); in pxa25x_udc_vbus_draw()
994 if (!IS_ERR_OR_NULL(udc->transceiver)) in pxa25x_udc_vbus_draw()
995 return usb_phy_set_power(udc->transceiver, mA); in pxa25x_udc_vbus_draw()
2282 struct pxa25x_udc *udc = platform_get_drvdata(dev); in pxa25x_udc_suspend() local
2285 if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command) in pxa25x_udc_suspend()
2287 udc->suspended = 1; in pxa25x_udc_suspend()
2290 pullup(udc); in pxa25x_udc_suspend()
2298 struct pxa25x_udc *udc = platform_get_drvdata(dev); in pxa25x_udc_resume() local
2301 udc->suspended = 0; in pxa25x_udc_resume()
2303 pullup(udc); in pxa25x_udc_resume()