Lines Matching refs:obex

197 	struct f_obex		*obex = func_to_obex(f);  in obex_set_alt()  local
200 if (intf == obex->ctrl_id) { in obex_set_alt()
205 "reset obex ttyGS%d control\n", obex->port_num); in obex_set_alt()
207 } else if (intf == obex->data_id) { in obex_set_alt()
211 if (obex->port.in->driver_data) { in obex_set_alt()
213 "reset obex ttyGS%d\n", obex->port_num); in obex_set_alt()
214 gserial_disconnect(&obex->port); in obex_set_alt()
217 if (!obex->port.in->desc || !obex->port.out->desc) { in obex_set_alt()
219 "init obex ttyGS%d\n", obex->port_num); in obex_set_alt()
221 obex->port.in) || in obex_set_alt()
223 obex->port.out)) { in obex_set_alt()
224 obex->port.out->desc = NULL; in obex_set_alt()
225 obex->port.in->desc = NULL; in obex_set_alt()
232 "activate obex ttyGS%d\n", obex->port_num); in obex_set_alt()
233 gserial_connect(&obex->port, obex->port_num); in obex_set_alt()
239 obex->cur_alt = alt; in obex_set_alt()
249 struct f_obex *obex = func_to_obex(f); in obex_get_alt() local
251 return obex->cur_alt; in obex_get_alt()
256 struct f_obex *obex = func_to_obex(f); in obex_disable() local
259 dev_dbg(&cdev->gadget->dev, "obex ttyGS%d disable\n", obex->port_num); in obex_disable()
260 gserial_disconnect(&obex->port); in obex_disable()
267 struct f_obex *obex = port_to_obex(g); in obex_connect() local
271 if (!obex->can_activate) in obex_connect()
278 obex->port_num, status); in obex_connect()
283 struct f_obex *obex = port_to_obex(g); in obex_disconnect() local
287 if (!obex->can_activate) in obex_disconnect()
294 obex->port_num, status); in obex_disconnect()
317 struct f_obex *obex = func_to_obex(f); in obex_bind() local
338 obex->ctrl_id = status; in obex_bind()
346 obex->data_id = status; in obex_bind()
358 obex->port.in = ep; in obex_bind()
364 obex->port.out = ep; in obex_bind()
387 obex->port_num, status); in obex_bind()
389 obex->can_activate = true; in obex_bind()
393 obex->port_num, in obex_bind()
395 obex->port.in->name, obex->port.out->name); in obex_bind()
401 if (obex->port.out) in obex_bind()
402 obex->port.out->driver_data = NULL; in obex_bind()
403 if (obex->port.in) in obex_bind()
404 obex->port.in->driver_data = NULL; in obex_bind()
496 struct f_obex *obex; in obex_free() local
498 obex = func_to_obex(f); in obex_free()
499 kfree(obex); in obex_free()
509 struct f_obex *obex; in obex_alloc() local
513 obex = kzalloc(sizeof(*obex), GFP_KERNEL); in obex_alloc()
514 if (!obex) in obex_alloc()
519 obex->port_num = opts->port_num; in obex_alloc()
521 obex->port.connect = obex_connect; in obex_alloc()
522 obex->port.disconnect = obex_disconnect; in obex_alloc()
524 obex->port.func.name = "obex"; in obex_alloc()
526 obex->port.func.bind = obex_bind; in obex_alloc()
527 obex->port.func.unbind = obex_unbind; in obex_alloc()
528 obex->port.func.set_alt = obex_set_alt; in obex_alloc()
529 obex->port.func.get_alt = obex_get_alt; in obex_alloc()
530 obex->port.func.disable = obex_disable; in obex_alloc()
531 obex->port.func.free_func = obex_free; in obex_alloc()
533 return &obex->port.func; in obex_alloc()
536 DECLARE_USB_FUNCTION_INIT(obex, obex_alloc_inst, obex_alloc);