Lines Matching refs:obex

191 	struct f_obex		*obex = func_to_obex(f);  in obex_set_alt()  local
194 if (intf == obex->ctrl_id) { in obex_set_alt()
199 "reset obex ttyGS%d control\n", obex->port_num); in obex_set_alt()
201 } else if (intf == obex->data_id) { in obex_set_alt()
205 if (obex->port.in->enabled) { in obex_set_alt()
207 "reset obex ttyGS%d\n", obex->port_num); in obex_set_alt()
208 gserial_disconnect(&obex->port); in obex_set_alt()
211 if (!obex->port.in->desc || !obex->port.out->desc) { in obex_set_alt()
213 "init obex ttyGS%d\n", obex->port_num); in obex_set_alt()
215 obex->port.in) || in obex_set_alt()
217 obex->port.out)) { in obex_set_alt()
218 obex->port.out->desc = NULL; in obex_set_alt()
219 obex->port.in->desc = NULL; in obex_set_alt()
226 "activate obex ttyGS%d\n", obex->port_num); in obex_set_alt()
227 gserial_connect(&obex->port, obex->port_num); in obex_set_alt()
233 obex->cur_alt = alt; in obex_set_alt()
243 struct f_obex *obex = func_to_obex(f); in obex_get_alt() local
245 return obex->cur_alt; in obex_get_alt()
250 struct f_obex *obex = func_to_obex(f); in obex_disable() local
253 dev_dbg(&cdev->gadget->dev, "obex ttyGS%d disable\n", obex->port_num); in obex_disable()
254 gserial_disconnect(&obex->port); in obex_disable()
261 struct f_obex *obex = port_to_obex(g); in obex_connect() local
269 obex->port_num, status); in obex_connect()
274 struct f_obex *obex = port_to_obex(g); in obex_disconnect() local
282 obex->port_num, status); in obex_disconnect()
305 struct f_obex *obex = func_to_obex(f); in obex_bind() local
326 obex->ctrl_id = status; in obex_bind()
334 obex->data_id = status; in obex_bind()
346 obex->port.in = ep; in obex_bind()
351 obex->port.out = ep; in obex_bind()
369 obex->port_num, in obex_bind()
370 obex->port.in->name, obex->port.out->name); in obex_bind()
447 struct f_obex *obex; in obex_free() local
449 obex = func_to_obex(f); in obex_free()
450 kfree(obex); in obex_free()
460 struct f_obex *obex; in obex_alloc() local
464 obex = kzalloc(sizeof(*obex), GFP_KERNEL); in obex_alloc()
465 if (!obex) in obex_alloc()
470 obex->port_num = opts->port_num; in obex_alloc()
472 obex->port.connect = obex_connect; in obex_alloc()
473 obex->port.disconnect = obex_disconnect; in obex_alloc()
475 obex->port.func.name = "obex"; in obex_alloc()
477 obex->port.func.bind = obex_bind; in obex_alloc()
478 obex->port.func.unbind = obex_unbind; in obex_alloc()
479 obex->port.func.set_alt = obex_set_alt; in obex_alloc()
480 obex->port.func.get_alt = obex_get_alt; in obex_alloc()
481 obex->port.func.disable = obex_disable; in obex_alloc()
482 obex->port.func.free_func = obex_free; in obex_alloc()
483 obex->port.func.bind_deactivated = true; in obex_alloc()
485 return &obex->port.func; in obex_alloc()
488 DECLARE_USB_FUNCTION_INIT(obex, obex_alloc_inst, obex_alloc);