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()
243 gser->port.in->name, gser->port.out->name); in gser_bind()
332 struct f_gser *gser; in gser_alloc() local
336 gser = kzalloc(sizeof(*gser), GFP_KERNEL); in gser_alloc()
337 if (!gser) in gser_alloc()
342 gser->port_num = opts->port_num; in gser_alloc()
344 gser->port.func.name = "gser"; in gser_alloc()
345 gser->port.func.strings = gser_strings; in gser_alloc()
346 gser->port.func.bind = gser_bind; in gser_alloc()
347 gser->port.func.unbind = gser_unbind; in gser_alloc()
348 gser->port.func.set_alt = gser_set_alt; in gser_alloc()
349 gser->port.func.disable = gser_disable; in gser_alloc()
350 gser->port.func.free_func = gser_free; in gser_alloc()
352 return &gser->port.func; in gser_alloc()
355 DECLARE_USB_FUNCTION_INIT(gser, gser_alloc_inst, gser_alloc);