Lines Matching defs:obex

191 	struct f_obex		*obex = func_to_obex(f);
194 if (intf == obex->ctrl_id) {
199 "reset obex ttyGS%d control\n", obex->port_num);
201 } else if (intf == obex->data_id) {
205 if (obex->port.in->enabled) {
207 "reset obex ttyGS%d\n", obex->port_num);
208 gserial_disconnect(&obex->port);
211 if (!obex->port.in->desc || !obex->port.out->desc) {
213 "init obex ttyGS%d\n", obex->port_num);
215 obex->port.in) ||
217 obex->port.out)) {
218 obex->port.out->desc = NULL;
219 obex->port.in->desc = NULL;
226 "activate obex ttyGS%d\n", obex->port_num);
227 gserial_connect(&obex->port, obex->port_num);
233 obex->cur_alt = alt;
243 struct f_obex *obex = func_to_obex(f);
245 return obex->cur_alt;
250 struct f_obex *obex = func_to_obex(f);
253 dev_dbg(&cdev->gadget->dev, "obex ttyGS%d disable\n", obex->port_num);
254 gserial_disconnect(&obex->port);
261 struct f_obex *obex = port_to_obex(g);
268 "obex ttyGS%d function activate --> %d\n",
269 obex->port_num, status);
274 struct f_obex *obex = port_to_obex(g);
281 "obex ttyGS%d function deactivate --> %d\n",
282 obex->port_num, status);
305 struct f_obex *obex = func_to_obex(f);
326 obex->ctrl_id = status;
334 obex->data_id = status;
346 obex->port.in = ep;
351 obex->port.out = ep;
368 dev_dbg(&cdev->gadget->dev, "obex ttyGS%d: %s speed IN/%s OUT/%s\n",
369 obex->port_num,
371 obex->port.in->name, obex->port.out->name);
448 struct f_obex *obex;
450 obex = func_to_obex(f);
451 kfree(obex);
461 struct f_obex *obex;
465 obex = kzalloc(sizeof(*obex), GFP_KERNEL);
466 if (!obex)
471 obex->port_num = opts->port_num;
473 obex->port.connect = obex_connect;
474 obex->port.disconnect = obex_disconnect;
476 obex->port.func.name = "obex";
478 obex->port.func.bind = obex_bind;
479 obex->port.func.unbind = obex_unbind;
480 obex->port.func.set_alt = obex_set_alt;
481 obex->port.func.get_alt = obex_get_alt;
482 obex->port.func.disable = obex_disable;
483 obex->port.func.free_func = obex_free;
484 obex->port.func.bind_deactivated = true;
486 return &obex->port.func;
489 DECLARE_USB_FUNCTION_INIT(obex, obex_alloc_inst, obex_alloc);