Commit | Line | Data |
---|---|---|
5fd54ace | 1 | // SPDX-License-Identifier: GPL-2.0+ |
f176a5d8 MN |
2 | /* |
3 | * multi.c -- Multifunction Composite driver | |
4 | * | |
5 | * Copyright (C) 2008 David Brownell | |
6 | * Copyright (C) 2008 Nokia Corporation | |
7 | * Copyright (C) 2009 Samsung Electronics | |
54b8360f | 8 | * Author: Michal Nazarewicz (mina86@mina86.com) |
f176a5d8 MN |
9 | */ |
10 | ||
11 | ||
12 | #include <linux/kernel.h> | |
279cc49a | 13 | #include <linux/module.h> |
73889015 | 14 | #include <linux/netdevice.h> |
f176a5d8 | 15 | |
59835ad7 | 16 | #include "u_serial.h" |
396cda90 MN |
17 | #if defined USB_ETH_RNDIS |
18 | # undef USB_ETH_RNDIS | |
19 | #endif | |
dbe4a99d | 20 | #ifdef CONFIG_USB_G_MULTI_RNDIS |
396cda90 | 21 | # define USB_ETH_RNDIS y |
f176a5d8 MN |
22 | #endif |
23 | ||
24 | ||
25 | #define DRIVER_DESC "Multifunction Composite Gadget" | |
f176a5d8 | 26 | |
279cc49a MN |
27 | MODULE_DESCRIPTION(DRIVER_DESC); |
28 | MODULE_AUTHOR("Michal Nazarewicz"); | |
29 | MODULE_LICENSE("GPL"); | |
f176a5d8 | 30 | |
f176a5d8 | 31 | |
1bcce939 | 32 | #include "f_mass_storage.h" |
f176a5d8 | 33 | |
73889015 | 34 | #include "u_ecm.h" |
396cda90 | 35 | #ifdef USB_ETH_RNDIS |
4d1a8f68 | 36 | # include "u_rndis.h" |
cbbd14a9 | 37 | # include "rndis.h" |
f176a5d8 | 38 | #endif |
f1a1823f | 39 | #include "u_ether.h" |
f176a5d8 | 40 | |
7d16e8d3 | 41 | USB_GADGET_COMPOSITE_OPTIONS(); |
279cc49a | 42 | |
f1a1823f AP |
43 | USB_ETHERNET_MODULE_PARAMETERS(); |
44 | ||
279cc49a MN |
45 | /***************************** Device Descriptor ****************************/ |
46 | ||
1c6529e9 MN |
47 | #define MULTI_VENDOR_NUM 0x1d6b /* Linux Foundation */ |
48 | #define MULTI_PRODUCT_NUM 0x0104 /* Multifunction Composite Gadget */ | |
279cc49a MN |
49 | |
50 | ||
51 | enum { | |
52 | __MULTI_NO_CONFIG, | |
53 | #ifdef CONFIG_USB_G_MULTI_RNDIS | |
54 | MULTI_RNDIS_CONFIG_NUM, | |
55 | #endif | |
56 | #ifdef CONFIG_USB_G_MULTI_CDC | |
57 | MULTI_CDC_CONFIG_NUM, | |
58 | #endif | |
59 | }; | |
60 | ||
f176a5d8 MN |
61 | |
62 | static struct usb_device_descriptor device_desc = { | |
63 | .bLength = sizeof device_desc, | |
64 | .bDescriptorType = USB_DT_DEVICE, | |
65 | ||
0aecfc1b | 66 | /* .bcdUSB = DYNAMIC */ |
f176a5d8 | 67 | |
279cc49a | 68 | .bDeviceClass = USB_CLASS_MISC /* 0xEF */, |
f176a5d8 MN |
69 | .bDeviceSubClass = 2, |
70 | .bDeviceProtocol = 1, | |
f176a5d8 MN |
71 | |
72 | /* Vendor and product id can be overridden by module parameters. */ | |
73 | .idVendor = cpu_to_le16(MULTI_VENDOR_NUM), | |
74 | .idProduct = cpu_to_le16(MULTI_PRODUCT_NUM), | |
f176a5d8 MN |
75 | }; |
76 | ||
21ddc2a8 | 77 | static const struct usb_descriptor_header *otg_desc[2]; |
f176a5d8 | 78 | |
279cc49a | 79 | enum { |
276e2e4f | 80 | MULTI_STRING_RNDIS_CONFIG_IDX = USB_GADGET_FIRST_AVAIL_IDX, |
279cc49a | 81 | MULTI_STRING_CDC_CONFIG_IDX, |
279cc49a | 82 | }; |
f176a5d8 | 83 | |
f176a5d8 | 84 | static struct usb_string strings_dev[] = { |
276e2e4f | 85 | [USB_GADGET_MANUFACTURER_IDX].s = "", |
d33f74fc | 86 | [USB_GADGET_PRODUCT_IDX].s = DRIVER_DESC, |
276e2e4f | 87 | [USB_GADGET_SERIAL_IDX].s = "", |
279cc49a | 88 | [MULTI_STRING_RNDIS_CONFIG_IDX].s = "Multifunction with RNDIS", |
279cc49a | 89 | [MULTI_STRING_CDC_CONFIG_IDX].s = "Multifunction with CDC ECM", |
f176a5d8 MN |
90 | { } /* end of list */ |
91 | }; | |
92 | ||
f176a5d8 | 93 | static struct usb_gadget_strings *dev_strings[] = { |
279cc49a MN |
94 | &(struct usb_gadget_strings){ |
95 | .language = 0x0409, /* en-us */ | |
96 | .strings = strings_dev, | |
97 | }, | |
f176a5d8 MN |
98 | NULL, |
99 | }; | |
100 | ||
f176a5d8 MN |
101 | |
102 | ||
103 | ||
104 | /****************************** Configurations ******************************/ | |
105 | ||
279cc49a | 106 | static struct fsg_module_parameters fsg_mod_data = { .stall = 1 }; |
6fdc5dd2 AP |
107 | #ifdef CONFIG_USB_GADGET_DEBUG_FILES |
108 | ||
109 | static unsigned int fsg_num_buffers = CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS; | |
110 | ||
111 | #else | |
112 | ||
113 | /* | |
114 | * Number of buffers we will use. | |
115 | * 2 is usually enough for good buffering pipeline | |
116 | */ | |
117 | #define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS | |
118 | ||
0c8b1992 | 119 | #endif /* CONFIG_USB_GADGET_DEBUG_FILES */ |
6fdc5dd2 | 120 | |
279cc49a MN |
121 | FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data); |
122 | ||
59835ad7 | 123 | static struct usb_function_instance *fi_acm; |
1bcce939 | 124 | static struct usb_function_instance *fi_msg; |
f176a5d8 | 125 | |
279cc49a | 126 | /********** RNDIS **********/ |
f176a5d8 | 127 | |
396cda90 | 128 | #ifdef USB_ETH_RNDIS |
4d1a8f68 | 129 | static struct usb_function_instance *fi_rndis; |
59835ad7 | 130 | static struct usb_function *f_acm_rndis; |
4d1a8f68 | 131 | static struct usb_function *f_rndis; |
1bcce939 | 132 | static struct usb_function *f_msg_rndis; |
f176a5d8 | 133 | |
c94e289f | 134 | static int rndis_do_config(struct usb_configuration *c) |
f176a5d8 MN |
135 | { |
136 | int ret; | |
137 | ||
138 | if (gadget_is_otg(c->cdev->gadget)) { | |
139 | c->descriptors = otg_desc; | |
140 | c->bmAttributes |= USB_CONFIG_ATT_WAKEUP; | |
141 | } | |
142 | ||
4d1a8f68 AP |
143 | f_rndis = usb_get_function(fi_rndis); |
144 | if (IS_ERR(f_rndis)) | |
145 | return PTR_ERR(f_rndis); | |
146 | ||
147 | ret = usb_add_function(c, f_rndis); | |
f176a5d8 | 148 | if (ret < 0) |
4d1a8f68 | 149 | goto err_func_rndis; |
f176a5d8 | 150 | |
59835ad7 | 151 | f_acm_rndis = usb_get_function(fi_acm); |
4d1a8f68 AP |
152 | if (IS_ERR(f_acm_rndis)) { |
153 | ret = PTR_ERR(f_acm_rndis); | |
154 | goto err_func_acm; | |
155 | } | |
59835ad7 SAS |
156 | |
157 | ret = usb_add_function(c, f_acm_rndis); | |
158 | if (ret) | |
159 | goto err_conf; | |
f176a5d8 | 160 | |
1bcce939 AP |
161 | f_msg_rndis = usb_get_function(fi_msg); |
162 | if (IS_ERR(f_msg_rndis)) { | |
163 | ret = PTR_ERR(f_msg_rndis); | |
59835ad7 | 164 | goto err_fsg; |
1bcce939 AP |
165 | } |
166 | ||
1bcce939 AP |
167 | ret = usb_add_function(c, f_msg_rndis); |
168 | if (ret) | |
169 | goto err_run; | |
f176a5d8 MN |
170 | |
171 | return 0; | |
1bcce939 AP |
172 | err_run: |
173 | usb_put_function(f_msg_rndis); | |
59835ad7 SAS |
174 | err_fsg: |
175 | usb_remove_function(c, f_acm_rndis); | |
176 | err_conf: | |
177 | usb_put_function(f_acm_rndis); | |
4d1a8f68 AP |
178 | err_func_acm: |
179 | usb_remove_function(c, f_rndis); | |
180 | err_func_rndis: | |
181 | usb_put_function(f_rndis); | |
59835ad7 | 182 | return ret; |
f176a5d8 MN |
183 | } |
184 | ||
6fcf1129 | 185 | static int rndis_config_register(struct usb_composite_dev *cdev) |
279cc49a MN |
186 | { |
187 | static struct usb_configuration config = { | |
279cc49a MN |
188 | .bConfigurationValue = MULTI_RNDIS_CONFIG_NUM, |
189 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, | |
190 | }; | |
191 | ||
192 | config.label = strings_dev[MULTI_STRING_RNDIS_CONFIG_IDX].s; | |
193 | config.iConfiguration = strings_dev[MULTI_STRING_RNDIS_CONFIG_IDX].id; | |
194 | ||
c9bfff9c | 195 | return usb_add_config(cdev, &config, rndis_do_config); |
279cc49a MN |
196 | } |
197 | ||
198 | #else | |
199 | ||
6fcf1129 | 200 | static int rndis_config_register(struct usb_composite_dev *cdev) |
279cc49a MN |
201 | { |
202 | return 0; | |
203 | } | |
f176a5d8 MN |
204 | |
205 | #endif | |
206 | ||
279cc49a MN |
207 | |
208 | /********** CDC ECM **********/ | |
209 | ||
f176a5d8 | 210 | #ifdef CONFIG_USB_G_MULTI_CDC |
73889015 | 211 | static struct usb_function_instance *fi_ecm; |
59835ad7 | 212 | static struct usb_function *f_acm_multi; |
73889015 | 213 | static struct usb_function *f_ecm; |
1bcce939 | 214 | static struct usb_function *f_msg_multi; |
f176a5d8 | 215 | |
c94e289f | 216 | static int cdc_do_config(struct usb_configuration *c) |
f176a5d8 MN |
217 | { |
218 | int ret; | |
219 | ||
220 | if (gadget_is_otg(c->cdev->gadget)) { | |
221 | c->descriptors = otg_desc; | |
222 | c->bmAttributes |= USB_CONFIG_ATT_WAKEUP; | |
223 | } | |
224 | ||
73889015 AP |
225 | f_ecm = usb_get_function(fi_ecm); |
226 | if (IS_ERR(f_ecm)) | |
227 | return PTR_ERR(f_ecm); | |
228 | ||
229 | ret = usb_add_function(c, f_ecm); | |
f176a5d8 | 230 | if (ret < 0) |
73889015 | 231 | goto err_func_ecm; |
f176a5d8 | 232 | |
59835ad7 SAS |
233 | /* implicit port_num is zero */ |
234 | f_acm_multi = usb_get_function(fi_acm); | |
73889015 AP |
235 | if (IS_ERR(f_acm_multi)) { |
236 | ret = PTR_ERR(f_acm_multi); | |
237 | goto err_func_acm; | |
238 | } | |
59835ad7 SAS |
239 | |
240 | ret = usb_add_function(c, f_acm_multi); | |
241 | if (ret) | |
242 | goto err_conf; | |
f176a5d8 | 243 | |
1bcce939 AP |
244 | f_msg_multi = usb_get_function(fi_msg); |
245 | if (IS_ERR(f_msg_multi)) { | |
246 | ret = PTR_ERR(f_msg_multi); | |
59835ad7 | 247 | goto err_fsg; |
1bcce939 AP |
248 | } |
249 | ||
1bcce939 AP |
250 | ret = usb_add_function(c, f_msg_multi); |
251 | if (ret) | |
252 | goto err_run; | |
f176a5d8 MN |
253 | |
254 | return 0; | |
1bcce939 AP |
255 | err_run: |
256 | usb_put_function(f_msg_multi); | |
59835ad7 SAS |
257 | err_fsg: |
258 | usb_remove_function(c, f_acm_multi); | |
259 | err_conf: | |
260 | usb_put_function(f_acm_multi); | |
73889015 AP |
261 | err_func_acm: |
262 | usb_remove_function(c, f_ecm); | |
263 | err_func_ecm: | |
264 | usb_put_function(f_ecm); | |
59835ad7 | 265 | return ret; |
f176a5d8 MN |
266 | } |
267 | ||
6fcf1129 | 268 | static int cdc_config_register(struct usb_composite_dev *cdev) |
279cc49a MN |
269 | { |
270 | static struct usb_configuration config = { | |
279cc49a MN |
271 | .bConfigurationValue = MULTI_CDC_CONFIG_NUM, |
272 | .bmAttributes = USB_CONFIG_ATT_SELFPOWER, | |
273 | }; | |
274 | ||
275 | config.label = strings_dev[MULTI_STRING_CDC_CONFIG_IDX].s; | |
276 | config.iConfiguration = strings_dev[MULTI_STRING_CDC_CONFIG_IDX].id; | |
277 | ||
c9bfff9c | 278 | return usb_add_config(cdev, &config, cdc_do_config); |
279cc49a MN |
279 | } |
280 | ||
281 | #else | |
282 | ||
6fcf1129 | 283 | static int cdc_config_register(struct usb_composite_dev *cdev) |
279cc49a MN |
284 | { |
285 | return 0; | |
286 | } | |
f176a5d8 MN |
287 | |
288 | #endif | |
289 | ||
290 | ||
291 | ||
292 | /****************************** Gadget Bind ******************************/ | |
293 | ||
6fcf1129 | 294 | static int multi_bind(struct usb_composite_dev *cdev) |
f176a5d8 MN |
295 | { |
296 | struct usb_gadget *gadget = cdev->gadget; | |
73889015 AP |
297 | #ifdef CONFIG_USB_G_MULTI_CDC |
298 | struct f_ecm_opts *ecm_opts; | |
4d1a8f68 AP |
299 | #endif |
300 | #ifdef USB_ETH_RNDIS | |
301 | struct f_rndis_opts *rndis_opts; | |
73889015 | 302 | #endif |
1bcce939 AP |
303 | struct fsg_opts *fsg_opts; |
304 | struct fsg_config config; | |
ed9cbda6 | 305 | int status; |
f176a5d8 MN |
306 | |
307 | if (!can_support_ecm(cdev->gadget)) { | |
308 | dev_err(&gadget->dev, "controller '%s' not usable\n", | |
4d1a8f68 | 309 | gadget->name); |
f176a5d8 MN |
310 | return -EINVAL; |
311 | } | |
312 | ||
73889015 AP |
313 | #ifdef CONFIG_USB_G_MULTI_CDC |
314 | fi_ecm = usb_get_function_instance("ecm"); | |
315 | if (IS_ERR(fi_ecm)) | |
316 | return PTR_ERR(fi_ecm); | |
317 | ||
318 | ecm_opts = container_of(fi_ecm, struct f_ecm_opts, func_inst); | |
319 | ||
320 | gether_set_qmult(ecm_opts->net, qmult); | |
321 | if (!gether_set_host_addr(ecm_opts->net, host_addr)) | |
322 | pr_info("using host ethernet address: %s", host_addr); | |
323 | if (!gether_set_dev_addr(ecm_opts->net, dev_addr)) | |
324 | pr_info("using self ethernet address: %s", dev_addr); | |
4d1a8f68 | 325 | #endif |
73889015 | 326 | |
4d1a8f68 AP |
327 | #ifdef USB_ETH_RNDIS |
328 | fi_rndis = usb_get_function_instance("rndis"); | |
329 | if (IS_ERR(fi_rndis)) { | |
330 | status = PTR_ERR(fi_rndis); | |
331 | goto fail; | |
332 | } | |
73889015 | 333 | |
4d1a8f68 | 334 | rndis_opts = container_of(fi_rndis, struct f_rndis_opts, func_inst); |
73889015 | 335 | |
4d1a8f68 AP |
336 | gether_set_qmult(rndis_opts->net, qmult); |
337 | if (!gether_set_host_addr(rndis_opts->net, host_addr)) | |
338 | pr_info("using host ethernet address: %s", host_addr); | |
339 | if (!gether_set_dev_addr(rndis_opts->net, dev_addr)) | |
340 | pr_info("using self ethernet address: %s", dev_addr); | |
73889015 AP |
341 | #endif |
342 | ||
343 | #if (defined CONFIG_USB_G_MULTI_CDC && defined USB_ETH_RNDIS) | |
4d1a8f68 AP |
344 | /* |
345 | * If both ecm and rndis are selected then: | |
346 | * 1) rndis borrows the net interface from ecm | |
347 | * 2) since the interface is shared it must not be bound | |
348 | * twice - in ecm's _and_ rndis' binds, so do it here. | |
349 | */ | |
73889015 AP |
350 | gether_set_gadget(ecm_opts->net, cdev->gadget); |
351 | status = gether_register_netdev(ecm_opts->net); | |
352 | if (status) | |
353 | goto fail0; | |
73889015 | 354 | |
4d1a8f68 AP |
355 | rndis_borrow_net(fi_rndis, ecm_opts->net); |
356 | ecm_opts->bound = true; | |
73889015 | 357 | #endif |
f176a5d8 MN |
358 | |
359 | /* set up serial link layer */ | |
59835ad7 SAS |
360 | fi_acm = usb_get_function_instance("acm"); |
361 | if (IS_ERR(fi_acm)) { | |
362 | status = PTR_ERR(fi_acm); | |
c4ed4ac1 | 363 | goto fail0; |
59835ad7 SAS |
364 | } |
365 | ||
f176a5d8 | 366 | /* set up mass storage function */ |
1bcce939 AP |
367 | fi_msg = usb_get_function_instance("mass_storage"); |
368 | if (IS_ERR(fi_msg)) { | |
369 | status = PTR_ERR(fi_msg); | |
370 | goto fail1; | |
f176a5d8 | 371 | } |
1bcce939 AP |
372 | fsg_config_from_params(&config, &fsg_mod_data, fsg_num_buffers); |
373 | fsg_opts = fsg_opts_from_func_inst(fi_msg); | |
374 | ||
375 | fsg_opts->no_configfs = true; | |
376 | status = fsg_common_set_num_buffers(fsg_opts->common, fsg_num_buffers); | |
377 | if (status) | |
378 | goto fail2; | |
379 | ||
1bcce939 AP |
380 | status = fsg_common_set_cdev(fsg_opts->common, cdev, config.can_stall); |
381 | if (status) | |
382 | goto fail_set_cdev; | |
383 | ||
384 | fsg_common_set_sysfs(fsg_opts->common, true); | |
385 | status = fsg_common_create_luns(fsg_opts->common, &config); | |
386 | if (status) | |
387 | goto fail_set_cdev; | |
388 | ||
389 | fsg_common_set_inquiry_string(fsg_opts->common, config.vendor_name, | |
390 | config.product_name); | |
f176a5d8 | 391 | |
a99d8a45 | 392 | /* allocate string IDs */ |
279cc49a MN |
393 | status = usb_string_ids_tab(cdev, strings_dev); |
394 | if (unlikely(status < 0)) | |
1bcce939 | 395 | goto fail_string_ids; |
d33f74fc | 396 | device_desc.iProduct = strings_dev[USB_GADGET_PRODUCT_IDX].id; |
f176a5d8 | 397 | |
21ddc2a8 LJ |
398 | if (gadget_is_otg(gadget) && !otg_desc[0]) { |
399 | struct usb_descriptor_header *usb_desc; | |
400 | ||
401 | usb_desc = usb_otg_descriptor_alloc(gadget); | |
c021e023 JJB |
402 | if (!usb_desc) { |
403 | status = -ENOMEM; | |
21ddc2a8 | 404 | goto fail_string_ids; |
c021e023 | 405 | } |
21ddc2a8 LJ |
406 | usb_otg_descriptor_init(gadget, usb_desc); |
407 | otg_desc[0] = usb_desc; | |
408 | otg_desc[1] = NULL; | |
409 | } | |
410 | ||
279cc49a MN |
411 | /* register configurations */ |
412 | status = rndis_config_register(cdev); | |
413 | if (unlikely(status < 0)) | |
21ddc2a8 | 414 | goto fail_otg_desc; |
f176a5d8 | 415 | |
279cc49a MN |
416 | status = cdc_config_register(cdev); |
417 | if (unlikely(status < 0)) | |
21ddc2a8 | 418 | goto fail_otg_desc; |
7d16e8d3 | 419 | usb_composite_overwrite_options(cdev, &coverwrite); |
f176a5d8 | 420 | |
279cc49a MN |
421 | /* we're done */ |
422 | dev_info(&gadget->dev, DRIVER_DESC "\n"); | |
f176a5d8 MN |
423 | return 0; |
424 | ||
279cc49a MN |
425 | |
426 | /* error recovery */ | |
21ddc2a8 LJ |
427 | fail_otg_desc: |
428 | kfree(otg_desc[0]); | |
429 | otg_desc[0] = NULL; | |
1bcce939 AP |
430 | fail_string_ids: |
431 | fsg_common_remove_luns(fsg_opts->common); | |
432 | fail_set_cdev: | |
1bcce939 | 433 | fsg_common_free_buffers(fsg_opts->common); |
f176a5d8 | 434 | fail2: |
1bcce939 | 435 | usb_put_function_instance(fi_msg); |
f176a5d8 | 436 | fail1: |
59835ad7 | 437 | usb_put_function_instance(fi_acm); |
f176a5d8 | 438 | fail0: |
4d1a8f68 AP |
439 | #ifdef USB_ETH_RNDIS |
440 | usb_put_function_instance(fi_rndis); | |
441 | fail: | |
442 | #endif | |
73889015 AP |
443 | #ifdef CONFIG_USB_G_MULTI_CDC |
444 | usb_put_function_instance(fi_ecm); | |
73889015 | 445 | #endif |
f176a5d8 MN |
446 | return status; |
447 | } | |
448 | ||
c94e289f | 449 | static int multi_unbind(struct usb_composite_dev *cdev) |
f176a5d8 | 450 | { |
1bcce939 AP |
451 | #ifdef CONFIG_USB_G_MULTI_CDC |
452 | usb_put_function(f_msg_multi); | |
453 | #endif | |
454 | #ifdef USB_ETH_RNDIS | |
455 | usb_put_function(f_msg_rndis); | |
456 | #endif | |
457 | usb_put_function_instance(fi_msg); | |
59835ad7 SAS |
458 | #ifdef CONFIG_USB_G_MULTI_CDC |
459 | usb_put_function(f_acm_multi); | |
460 | #endif | |
461 | #ifdef USB_ETH_RNDIS | |
462 | usb_put_function(f_acm_rndis); | |
463 | #endif | |
464 | usb_put_function_instance(fi_acm); | |
4d1a8f68 AP |
465 | #ifdef USB_ETH_RNDIS |
466 | usb_put_function(f_rndis); | |
467 | usb_put_function_instance(fi_rndis); | |
468 | #endif | |
73889015 AP |
469 | #ifdef CONFIG_USB_G_MULTI_CDC |
470 | usb_put_function(f_ecm); | |
471 | usb_put_function_instance(fi_ecm); | |
73889015 | 472 | #endif |
21ddc2a8 LJ |
473 | kfree(otg_desc[0]); |
474 | otg_desc[0] = NULL; | |
475 | ||
f176a5d8 MN |
476 | return 0; |
477 | } | |
478 | ||
479 | ||
480 | /****************************** Some noise ******************************/ | |
481 | ||
482 | ||
c94e289f | 483 | static struct usb_composite_driver multi_driver = { |
f176a5d8 MN |
484 | .name = "g_multi", |
485 | .dev = &device_desc, | |
486 | .strings = dev_strings, | |
463f67ae | 487 | .max_speed = USB_SPEED_SUPER, |
03e42bd5 | 488 | .bind = multi_bind, |
c94e289f | 489 | .unbind = multi_unbind, |
a99d8a45 | 490 | .needs_serial = 1, |
f176a5d8 MN |
491 | }; |
492 | ||
909346a8 | 493 | module_usb_composite_driver(multi_driver); |