Lines Matching refs:gser
148 struct f_gser *gser = func_to_gser(f); in gser_set_alt() local
153 if (gser->port.in->enabled) { in gser_set_alt()
155 "reset generic ttyGS%d\n", gser->port_num); in gser_set_alt()
156 gserial_disconnect(&gser->port); in gser_set_alt()
158 if (!gser->port.in->desc || !gser->port.out->desc) { in gser_set_alt()
160 "activate generic ttyGS%d\n", gser->port_num); in gser_set_alt()
161 if (config_ep_by_speed(cdev->gadget, f, gser->port.in) || in gser_set_alt()
162 config_ep_by_speed(cdev->gadget, f, gser->port.out)) { in gser_set_alt()
163 gser->port.in->desc = NULL; in gser_set_alt()
164 gser->port.out->desc = NULL; in gser_set_alt()
168 gserial_connect(&gser->port, gser->port_num); in gser_set_alt()
174 struct f_gser *gser = func_to_gser(f); in gser_disable() local
178 "generic ttyGS%d deactivated\n", gser->port_num); in gser_disable()
179 gserial_disconnect(&gser->port); in gser_disable()
189 struct f_gser *gser = func_to_gser(f); in gser_bind() local
209 gser->data_id = status; in gser_bind()
218 gser->port.in = ep; in gser_bind()
223 gser->port.out = ep; in gser_bind()
240 gser->port_num, in gser_bind()
241 gser->port.in->name, gser->port.out->name); in gser_bind()
346 struct f_gser *gser = func_to_gser(f); in gser_unbind() local
349 gserial_disconnect(&gser->port); in gser_unbind()
355 struct f_gser *gser = func_to_gser(f); in gser_resume() local
357 gserial_resume(&gser->port); in gser_resume()
362 struct f_gser *gser = func_to_gser(f); in gser_suspend() local
364 gserial_suspend(&gser->port); in gser_suspend()
369 struct f_gser *gser; in gser_alloc() local
373 gser = kzalloc(sizeof(*gser), GFP_KERNEL); in gser_alloc()
374 if (!gser) in gser_alloc()
379 gser->port_num = opts->port_num; in gser_alloc()
381 gser->port.func.name = "gser"; in gser_alloc()
382 gser->port.func.strings = gser_strings; in gser_alloc()
383 gser->port.func.bind = gser_bind; in gser_alloc()
384 gser->port.func.unbind = gser_unbind; in gser_alloc()
385 gser->port.func.set_alt = gser_set_alt; in gser_alloc()
386 gser->port.func.disable = gser_disable; in gser_alloc()
387 gser->port.func.free_func = gser_free; in gser_alloc()
388 gser->port.func.resume = gser_resume; in gser_alloc()
389 gser->port.func.suspend = gser_suspend; in gser_alloc()
391 return &gser->port.func; in gser_alloc()
394 DECLARE_USB_FUNCTION_INIT(gser, gser_alloc_inst, gser_alloc);