Lines Matching refs:obex

195 	struct f_obex		*obex = func_to_obex(f);  in obex_set_alt()  local
198 if (intf == obex->ctrl_id) { in obex_set_alt()
203 "reset obex ttyGS%d control\n", obex->port_num); in obex_set_alt()
205 } else if (intf == obex->data_id) { in obex_set_alt()
209 if (obex->port.in->enabled) { in obex_set_alt()
211 "reset obex ttyGS%d\n", obex->port_num); in obex_set_alt()
212 gserial_disconnect(&obex->port); in obex_set_alt()
215 if (!obex->port.in->desc || !obex->port.out->desc) { in obex_set_alt()
217 "init obex ttyGS%d\n", obex->port_num); in obex_set_alt()
219 obex->port.in) || in obex_set_alt()
221 obex->port.out)) { in obex_set_alt()
222 obex->port.out->desc = NULL; in obex_set_alt()
223 obex->port.in->desc = NULL; in obex_set_alt()
230 "activate obex ttyGS%d\n", obex->port_num); in obex_set_alt()
231 gserial_connect(&obex->port, obex->port_num); in obex_set_alt()
237 obex->cur_alt = alt; in obex_set_alt()
247 struct f_obex *obex = func_to_obex(f); in obex_get_alt() local
249 return obex->cur_alt; in obex_get_alt()
254 struct f_obex *obex = func_to_obex(f); in obex_disable() local
257 dev_dbg(&cdev->gadget->dev, "obex ttyGS%d disable\n", obex->port_num); in obex_disable()
258 gserial_disconnect(&obex->port); in obex_disable()
265 struct f_obex *obex = port_to_obex(g); in obex_connect() local
273 obex->port_num, status); in obex_connect()
278 struct f_obex *obex = port_to_obex(g); in obex_disconnect() local
286 obex->port_num, status); in obex_disconnect()
309 struct f_obex *obex = func_to_obex(f); in obex_bind() local
330 obex->ctrl_id = status; in obex_bind()
338 obex->data_id = status; in obex_bind()
350 obex->port.in = ep; in obex_bind()
355 obex->port.out = ep; in obex_bind()
372 obex->port_num, in obex_bind()
374 obex->port.in->name, obex->port.out->name); in obex_bind()
451 struct f_obex *obex; in obex_free() local
453 obex = func_to_obex(f); in obex_free()
454 kfree(obex); in obex_free()
464 struct f_obex *obex; in obex_alloc() local
468 obex = kzalloc(sizeof(*obex), GFP_KERNEL); in obex_alloc()
469 if (!obex) in obex_alloc()
474 obex->port_num = opts->port_num; in obex_alloc()
476 obex->port.connect = obex_connect; in obex_alloc()
477 obex->port.disconnect = obex_disconnect; in obex_alloc()
479 obex->port.func.name = "obex"; in obex_alloc()
481 obex->port.func.bind = obex_bind; in obex_alloc()
482 obex->port.func.unbind = obex_unbind; in obex_alloc()
483 obex->port.func.set_alt = obex_set_alt; in obex_alloc()
484 obex->port.func.get_alt = obex_get_alt; in obex_alloc()
485 obex->port.func.disable = obex_disable; in obex_alloc()
486 obex->port.func.free_func = obex_free; in obex_alloc()
487 obex->port.func.bind_deactivated = true; in obex_alloc()
489 return &obex->port.func; in obex_alloc()
492 DECLARE_USB_FUNCTION_INIT(obex, obex_alloc_inst, obex_alloc);