]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/usb/cdc.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[linux-2.6-omap-h63xx.git] / include / linux / usb / cdc.h
index ba617c3724552a91bca0147b8150b8ddad549691..ca228bb942186e5ab984baec8d5326cd56d4f0d6 100644 (file)
@@ -6,6 +6,9 @@
  * firmware based USB peripherals.
  */
 
+#ifndef __LINUX_USB_CDC_H
+#define __LINUX_USB_CDC_H
+
 #define USB_CDC_SUBCLASS_ACM                   0x02
 #define USB_CDC_SUBCLASS_ETHERNET              0x06
 #define USB_CDC_SUBCLASS_WHCM                  0x08
  * Class-Specific descriptors ... there are a couple dozen of them
  */
 
-#define USB_CDC_HEADER_TYPE            0x00            /* header_desc */
-#define USB_CDC_CALL_MANAGEMENT_TYPE   0x01            /* call_mgmt_descriptor */
-#define USB_CDC_ACM_TYPE               0x02            /* acm_descriptor */
-#define USB_CDC_UNION_TYPE             0x06            /* union_desc */
+#define USB_CDC_HEADER_TYPE            0x00    /* header_desc */
+#define USB_CDC_CALL_MANAGEMENT_TYPE   0x01    /* call_mgmt_descriptor */
+#define USB_CDC_ACM_TYPE               0x02    /* acm_descriptor */
+#define USB_CDC_UNION_TYPE             0x06    /* union_desc */
 #define USB_CDC_COUNTRY_TYPE           0x07
-#define USB_CDC_NETWORK_TERMINAL_TYPE  0x0a            /* network_terminal_desc */
-#define USB_CDC_ETHERNET_TYPE          0x0f            /* ether_desc */
+#define USB_CDC_NETWORK_TERMINAL_TYPE  0x0a    /* network_terminal_desc */
+#define USB_CDC_ETHERNET_TYPE          0x0f    /* ether_desc */
 #define USB_CDC_WHCM_TYPE              0x11
-#define USB_CDC_MDLM_TYPE              0x12            /* mdlm_desc */
-#define USB_CDC_MDLM_DETAIL_TYPE       0x13            /* mdlm_detail_desc */
+#define USB_CDC_MDLM_TYPE              0x12    /* mdlm_desc */
+#define USB_CDC_MDLM_DETAIL_TYPE       0x13    /* mdlm_detail_desc */
 #define USB_CDC_DMM_TYPE               0x14
 #define USB_CDC_OBEX_TYPE              0x15
 
@@ -73,6 +76,13 @@ struct usb_cdc_acm_descriptor {
        __u8    bmCapabilities;
 } __attribute__ ((packed));
 
+/* capabilities from 5.2.3.3 */
+
+#define USB_CDC_COMM_FEATURE   0x01
+#define USB_CDC_CAP_LINE       0x02
+#define USB_CDC_CAP_BRK        0x04
+#define USB_CDC_CAP_NOTIFY     0x08
+
 /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */
 struct usb_cdc_union_desc {
        __u8    bLength;
@@ -84,6 +94,17 @@ struct usb_cdc_union_desc {
        /* ... and there could be other slave interfaces */
 } __attribute__ ((packed));
 
+/* "Country Selection Functional Descriptor" from CDC spec 5.2.3.9 */
+struct usb_cdc_country_functional_desc {
+       __u8    bLength;
+       __u8    bDescriptorType;
+       __u8    bDescriptorSubType;
+
+       __u8    iCountryCodeRelDate;
+       __le16  wCountyCode0;
+       /* ... and there can be a lot of country codes */
+} __attribute__ ((packed));
+
 /* "Network Channel Terminal Functional Descriptor" from CDC spec 5.2.3.11 */
 struct usb_cdc_network_terminal_desc {
        __u8    bLength;
@@ -109,6 +130,15 @@ struct usb_cdc_ether_desc {
        __u8    bNumberPowerFilters;
 } __attribute__ ((packed));
 
+/* "Telephone Control Model Functional Descriptor" from CDC WMC spec 6.3..3 */
+struct usb_cdc_dmm_desc {
+       __u8    bFunctionLength;
+       __u8    bDescriptorType;
+       __u8    bDescriptorSubtype;
+       __u16   bcdVersion;
+       __le16  wMaxCommand;
+} __attribute__ ((packed));
+
 /* "MDLM Functional Descriptor" from CDC WMC spec 6.7.2.3 */
 struct usb_cdc_mdlm_desc {
        __u8    bLength;
@@ -203,3 +233,4 @@ struct usb_cdc_notification {
        __le16  wLength;
 } __attribute__ ((packed));
 
+#endif /* __LINUX_USB_CDC_H */