diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-01 12:20:28 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-01 12:20:28 -0500 |
commit | f9b0f5170918695891f42645737682ccb452ee13 (patch) | |
tree | 75eaab0ff54f8aadaa6375df140cc9d685f78d95 /include/linux/usb | |
parent | 8062d94a545457a83d5291bd62c3bfd14200bba0 (diff) | |
parent | 6440093f5eae9842feb06e40d41c3bd569b6b461 (diff) |
Merge tag 'gadget-for-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
USB: Gadget: changes for 3.4
This merge is rather big. Here's what it contains:
For am5536udc we have just simple coding style fixes. Nothing that has any
potential to cause any issues going forward.
With mv_udc, there's only one single change removing an unneeded NULL check.
at91_udc also only saw a single change this merge window, and that's only
removing a duplicated header.
The Renesas controller has a few more involved changes. Support for SUDMAC was
added, there's now a special handling of IRQ resources for when the IRQ line is
shared between Renesas controller and SUDMAC, we also had a bug fix where
Renesas controller would sleep in atomic context while doing DMA transfers from
a tasklet. There were also a set of minor cleanups.
The FSL UDC also had a scheduling in atomic context bug fix, but that's all.
Thanks to Sebastian, the dummy_hcd now works better than ever with support for
scatterlists and streams. Sebastian also added SuperSpeed descriptors to the
serial gadgets.
The highlight on this merge is the addition of a generic API for mapping and
unmapping usb_requests. This will avoid code duplication on all UDC controllers
and also kills all the defines for DMA_ADDR_INVALID which UDC controllers
sprinkled around. A few of the UDC controllers were already converted to use
this new API.
Conflicts:
drivers/usb/dwc3/gadget.c
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/audio-v2.h | 21 | ||||
-rw-r--r-- | include/linux/usb/gadget.h | 10 | ||||
-rw-r--r-- | include/linux/usb/renesas_usbhs.h | 1 |
3 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h index 964cb603f7c7..ed13053153f4 100644 --- a/include/linux/usb/audio-v2.h +++ b/include/linux/usb/audio-v2.h | |||
@@ -43,6 +43,27 @@ static inline bool uac2_control_is_writeable(u32 bmControls, u8 control) | |||
43 | return (bmControls >> (control * 2)) & 0x2; | 43 | return (bmControls >> (control * 2)) & 0x2; |
44 | } | 44 | } |
45 | 45 | ||
46 | /* 4.7.2 Class-Specific AC Interface Descriptor */ | ||
47 | struct uac2_ac_header_descriptor { | ||
48 | __u8 bLength; /* 9 */ | ||
49 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ | ||
50 | __u8 bDescriptorSubtype; /* UAC_MS_HEADER */ | ||
51 | __le16 bcdADC; /* 0x0200 */ | ||
52 | __u8 bCategory; | ||
53 | __le16 wTotalLength; /* includes Unit and Terminal desc. */ | ||
54 | __u8 bmControls; | ||
55 | } __packed; | ||
56 | |||
57 | /* 2.3.1.6 Type I Format Type Descriptor (Frmts20 final.pdf)*/ | ||
58 | struct uac2_format_type_i_descriptor { | ||
59 | __u8 bLength; /* in bytes: 6 */ | ||
60 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ | ||
61 | __u8 bDescriptorSubtype; /* FORMAT_TYPE */ | ||
62 | __u8 bFormatType; /* FORMAT_TYPE_1 */ | ||
63 | __u8 bSubslotSize; /* {1,2,3,4} */ | ||
64 | __u8 bBitResolution; | ||
65 | } __packed; | ||
66 | |||
46 | /* 4.7.2.1 Clock Source Descriptor */ | 67 | /* 4.7.2.1 Clock Source Descriptor */ |
47 | 68 | ||
48 | struct uac_clock_source_descriptor { | 69 | struct uac_clock_source_descriptor { |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index da653b5c7134..9517466ababb 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -950,6 +950,16 @@ static inline void usb_free_descriptors(struct usb_descriptor_header **v) | |||
950 | 950 | ||
951 | /*-------------------------------------------------------------------------*/ | 951 | /*-------------------------------------------------------------------------*/ |
952 | 952 | ||
953 | /* utility to simplify map/unmap of usb_requests to/from DMA */ | ||
954 | |||
955 | extern int usb_gadget_map_request(struct usb_gadget *gadget, | ||
956 | struct usb_request *req, int is_in); | ||
957 | |||
958 | extern void usb_gadget_unmap_request(struct usb_gadget *gadget, | ||
959 | struct usb_request *req, int is_in); | ||
960 | |||
961 | /*-------------------------------------------------------------------------*/ | ||
962 | |||
953 | /* utility wrapping a simple endpoint selection policy */ | 963 | /* utility wrapping a simple endpoint selection policy */ |
954 | 964 | ||
955 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, | 965 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, |
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h index 0d3f98879256..547e59cc00ea 100644 --- a/include/linux/usb/renesas_usbhs.h +++ b/include/linux/usb/renesas_usbhs.h | |||
@@ -149,6 +149,7 @@ struct renesas_usbhs_driver_param { | |||
149 | * option: | 149 | * option: |
150 | */ | 150 | */ |
151 | u32 has_otg:1; /* for controlling PWEN/EXTLP */ | 151 | u32 has_otg:1; /* for controlling PWEN/EXTLP */ |
152 | u32 has_sudmac:1; /* for SUDMAC */ | ||
152 | }; | 153 | }; |
153 | 154 | ||
154 | /* | 155 | /* |