Lines Matching +full:cdc +full:- +full:acm
1 // SPDX-License-Identifier: GPL-2.0+
3 * cdc2.c -- CDC Composite driver, with ECM and ACM support
17 #define DRIVER_DESC "CDC Composite Gadget"
20 /*-------------------------------------------------------------------------*/
22 /* DO NOT REUSE THESE IDs with a protocol-incompatible driver!! Ever!!
23 * Instead: allocate your own, using normal USB-IF procedures.
27 * It's for devices with only this composite CDC configuration.
30 #define CDC_PRODUCT_NUM 0xa4aa /* CDC Composite: ECM + ACM */
36 /*-------------------------------------------------------------------------*/
70 .language = 0x0409, /* en-us */
79 /*-------------------------------------------------------------------------*/
87 * We _always_ have both CDC ECM and CDC ACM functions.
93 if (gadget_is_otg(c->cdev->gadget)) { in cdc_do_config()
94 c->descriptors = otg_desc; in cdc_do_config()
95 c->bmAttributes |= USB_CONFIG_ATT_WAKEUP; in cdc_do_config()
130 .label = "CDC Composite (ECM + ACM)",
136 /*-------------------------------------------------------------------------*/
140 struct usb_gadget *gadget = cdev->gadget; in cdc_bind()
144 if (!can_support_ecm(cdev->gadget)) { in cdc_bind()
145 dev_err(&gadget->dev, "controller '%s' not usable\n", in cdc_bind()
146 gadget->name); in cdc_bind()
147 return -EINVAL; in cdc_bind()
156 gether_set_qmult(ecm_opts->net, qmult); in cdc_bind()
157 if (!gether_set_host_addr(ecm_opts->net, host_addr)) in cdc_bind()
159 if (!gether_set_dev_addr(ecm_opts->net, dev_addr)) in cdc_bind()
162 fi_serial = usb_get_function_instance("acm"); in cdc_bind()
183 status = -ENOMEM; in cdc_bind()
197 dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n", in cdc_bind()