Lines Matching refs:gser
131 struct f_gser *gser = func_to_gser(f);
136 if (gser->port.in->driver_data) {
137 DBG(cdev, "reset generic ttyGS%d\n", gser->port_num);
138 gserial_disconnect(&gser->port);
140 DBG(cdev, "activate generic ttyGS%d\n", gser->port_num);
141 gser->port.in_desc = ep_choose(cdev->gadget,
142 gser->hs.in, gser->fs.in);
143 gser->port.out_desc = ep_choose(cdev->gadget,
144 gser->hs.out, gser->fs.out);
146 gserial_connect(&gser->port, gser->port_num);
152 struct f_gser *gser = func_to_gser(f);
155 DBG(cdev, "generic ttyGS%d deactivated\n", gser->port_num);
156 gserial_disconnect(&gser->port);
167 struct f_gser *gser = func_to_gser(f);
175 gser->data_id = status;
184 gser->port.in = ep;
190 gser->port.out = ep;
196 gser->fs.in = usb_find_endpoint(gser_fs_function,
198 gser->fs.out = usb_find_endpoint(gser_fs_function,
215 gser->hs.in = usb_find_endpoint(gser_hs_function,
217 gser->hs.out = usb_find_endpoint(gser_hs_function,
222 gser->port_num,
224 gser->port.in->name, gser->port.out->name);
229 if (gser->port.out)
230 gser->port.out->driver_data = NULL;
231 if (gser->port.in)
232 gser->port.in->driver_data = NULL;
262 struct f_gser *gser;
278 gser = kzalloc(sizeof *gser, GFP_KERNEL);
279 if (!gser)
282 gser->port_num = port_num;
284 gser->port.func.name = "gser";
285 gser->port.func.strings = gser_strings;
286 gser->port.func.bind = gser_bind;
287 gser->port.func.unbind = gser_unbind;
288 gser->port.func.set_alt = gser_set_alt;
289 gser->port.func.disable = gser_disable;
291 status = usb_add_function(c, &gser->port.func);
293 kfree(gser);