Lines Matching refs:udc
69 static inline void start_watchdog(struct pxa25x_udc *udc) in start_watchdog() argument
72 udc->watchdog.base = get_timer(0); in start_watchdog()
73 udc->watchdog.running = 1; in start_watchdog()
76 static inline void stop_watchdog(struct pxa25x_udc *udc) in stop_watchdog() argument
78 udc->watchdog.running = 0; in stop_watchdog()
82 static inline void test_watchdog(struct pxa25x_udc *udc) in test_watchdog() argument
84 if (!udc->watchdog.running) in test_watchdog()
87 debug("watchdog %ld %ld\n", get_timer(udc->watchdog.base), in test_watchdog()
88 udc->watchdog.period); in test_watchdog()
90 if (get_timer(udc->watchdog.base) >= udc->watchdog.period) { in test_watchdog()
91 stop_watchdog(udc); in test_watchdog()
92 udc->watchdog.function(udc); in test_watchdog()
1032 static int pullup(struct pxa25x_udc *udc) in pullup() argument
1034 if (udc->pullup) in pullup()
1040 int is_active = udc->pullup; in pullup()
1042 if (!udc->active) { in pullup()
1043 udc->active = 1; in pullup()
1044 udc_enable(udc); in pullup()
1047 if (udc->active) { in pullup()
1048 if (udc->gadget.speed != USB_SPEED_UNKNOWN) in pullup()
1049 stop_activity(udc, udc->driver); in pullup()
1050 udc_disable(udc); in pullup()
1051 udc->active = 0; in pullup()
1061 struct pxa25x_udc *udc; in pxa25x_udc_vbus_session() local
1063 udc = container_of(_gadget, struct pxa25x_udc, gadget); in pxa25x_udc_vbus_session()
1065 pullup(udc); in pxa25x_udc_vbus_session()
1072 struct pxa25x_udc *udc; in pxa25x_udc_pullup() local
1074 udc = container_of(_gadget, struct pxa25x_udc, gadget); in pxa25x_udc_pullup()
1077 if (!udc->mach->udc_command) in pxa25x_udc_pullup()
1080 udc->pullup = (is_active != 0); in pxa25x_udc_pullup()
1081 pullup(udc); in pxa25x_udc_pullup()