diff options
Diffstat (limited to 'drivers/usb/gadget/serial.c')
| -rw-r--r-- | drivers/usb/gadget/serial.c | 51 |
1 files changed, 11 insertions, 40 deletions
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index 9e4f1c6935a5..c925d9222f53 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c | |||
| @@ -1422,49 +1422,20 @@ static int gs_bind(struct usb_gadget *gadget) | |||
| 1422 | int ret; | 1422 | int ret; |
| 1423 | struct usb_ep *ep; | 1423 | struct usb_ep *ep; |
| 1424 | struct gs_dev *dev; | 1424 | struct gs_dev *dev; |
| 1425 | int gcnum; | ||
| 1425 | 1426 | ||
| 1426 | /* device specific */ | 1427 | /* Some controllers can't support CDC ACM: |
| 1427 | if (gadget_is_net2280(gadget)) { | 1428 | * - sh doesn't support multiple interfaces or configs; |
| 1428 | gs_device_desc.bcdDevice = | 1429 | * - sa1100 doesn't have a third interrupt endpoint |
| 1429 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0001); | 1430 | */ |
| 1430 | } else if (gadget_is_pxa(gadget)) { | 1431 | if (gadget_is_sh(gadget) || gadget_is_sa1100(gadget)) |
| 1431 | gs_device_desc.bcdDevice = | ||
| 1432 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0002); | ||
| 1433 | } else if (gadget_is_sh(gadget)) { | ||
| 1434 | gs_device_desc.bcdDevice = | ||
| 1435 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0003); | ||
| 1436 | /* sh doesn't support multiple interfaces or configs */ | ||
| 1437 | use_acm = 0; | 1432 | use_acm = 0; |
| 1438 | } else if (gadget_is_sa1100(gadget)) { | 1433 | |
| 1439 | gs_device_desc.bcdDevice = | 1434 | gcnum = usb_gadget_controller_number(gadget); |
| 1440 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0004); | 1435 | if (gcnum >= 0) |
| 1441 | /* sa1100 doesn't support necessary endpoints */ | ||
| 1442 | use_acm = 0; | ||
| 1443 | } else if (gadget_is_goku(gadget)) { | ||
| 1444 | gs_device_desc.bcdDevice = | ||
| 1445 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0005); | ||
| 1446 | } else if (gadget_is_mq11xx(gadget)) { | ||
| 1447 | gs_device_desc.bcdDevice = | ||
| 1448 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0006); | ||
| 1449 | } else if (gadget_is_omap(gadget)) { | ||
| 1450 | gs_device_desc.bcdDevice = | ||
| 1451 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0007); | ||
| 1452 | } else if (gadget_is_lh7a40x(gadget)) { | ||
| 1453 | gs_device_desc.bcdDevice = | ||
| 1454 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0008); | ||
| 1455 | } else if (gadget_is_n9604(gadget)) { | ||
| 1456 | gs_device_desc.bcdDevice = | ||
| 1457 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0009); | ||
| 1458 | } else if (gadget_is_pxa27x(gadget)) { | ||
| 1459 | gs_device_desc.bcdDevice = | ||
| 1460 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0011); | ||
| 1461 | } else if (gadget_is_s3c2410(gadget)) { | ||
| 1462 | gs_device_desc.bcdDevice = | ||
| 1463 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0012); | ||
| 1464 | } else if (gadget_is_at91(gadget)) { | ||
| 1465 | gs_device_desc.bcdDevice = | 1436 | gs_device_desc.bcdDevice = |
| 1466 | __constant_cpu_to_le16(GS_VERSION_NUM|0x0013); | 1437 | cpu_to_le16(GS_VERSION_NUM | gcnum); |
| 1467 | } else { | 1438 | else { |
| 1468 | printk(KERN_WARNING "gs_bind: controller '%s' not recognized\n", | 1439 | printk(KERN_WARNING "gs_bind: controller '%s' not recognized\n", |
| 1469 | gadget->name); | 1440 | gadget->name); |
| 1470 | /* unrecognized, but safe unless bulk is REALLY quirky */ | 1441 | /* unrecognized, but safe unless bulk is REALLY quirky */ |
