aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-04 14:03:20 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-04 14:03:20 -0500
commit4d4bac4499e9955521af80198063ef9c2f2bd634 (patch)
treeb02fb1f3d343d3a4a9864be18eec04e10f43d410 /tools
parent7fa40910e0bf5ef32eca49595d950cb24f6402bf (diff)
parent9298b4aad37e8c6962edcdbd0b62620adb207d03 (diff)
Merge tag 'usb-for-v3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes: usb: patches for v3.20 merge window Here's the big pull request for Gadgets and PHYs. It's a total of 217 non-merge commits with pretty much everything being touched. The most important bits are a ton of new documentation for almost all usb gadget functions, a new isp1760 UDC driver, several improvements to the old net2280 UDC driver, and some minor tracepoint improvements to dwc3. Other than that, a big list of minor cleanups, smaller bugfixes and new features all over the place. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/usb/ffs-aio-example/multibuff/host_app/test.c14
-rw-r--r--tools/usb/ffs-aio-example/simple/device_app/aio_simple.c2
-rw-r--r--tools/usb/ffs-aio-example/simple/host_app/test.c17
3 files changed, 20 insertions, 13 deletions
diff --git a/tools/usb/ffs-aio-example/multibuff/host_app/test.c b/tools/usb/ffs-aio-example/multibuff/host_app/test.c
index daa3abe6bebd..2cbcce6e8dd7 100644
--- a/tools/usb/ffs-aio-example/multibuff/host_app/test.c
+++ b/tools/usb/ffs-aio-example/multibuff/host_app/test.c
@@ -33,11 +33,6 @@
33#define VENDOR 0x1d6b 33#define VENDOR 0x1d6b
34#define PRODUCT 0x0105 34#define PRODUCT 0x0105
35 35
36/* endpoints indexes */
37
38#define EP_BULK_IN (1 | LIBUSB_ENDPOINT_IN)
39#define EP_BULK_OUT (2 | LIBUSB_ENDPOINT_OUT)
40
41#define BUF_LEN 8192 36#define BUF_LEN 8192
42 37
43/* 38/*
@@ -159,14 +154,21 @@ void test_exit(struct test_state *state)
159int main(void) 154int main(void)
160{ 155{
161 struct test_state state; 156 struct test_state state;
157 struct libusb_config_descriptor *conf;
158 struct libusb_interface_descriptor const *iface;
159 unsigned char addr;
162 160
163 if (test_init(&state)) 161 if (test_init(&state))
164 return 1; 162 return 1;
165 163
164 libusb_get_config_descriptor(state.found, 0, &conf);
165 iface = &conf->interface[0].altsetting[0];
166 addr = iface->endpoint[0].bEndpointAddress;
167
166 while (1) { 168 while (1) {
167 static unsigned char buffer[BUF_LEN]; 169 static unsigned char buffer[BUF_LEN];
168 int bytes; 170 int bytes;
169 libusb_bulk_transfer(state.handle, EP_BULK_IN, buffer, BUF_LEN, 171 libusb_bulk_transfer(state.handle, addr, buffer, BUF_LEN,
170 &bytes, 500); 172 &bytes, 500);
171 } 173 }
172 test_exit(&state); 174 test_exit(&state);
diff --git a/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c b/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c
index adc310a6d489..1f44a29818bf 100644
--- a/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c
+++ b/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c
@@ -103,12 +103,14 @@ static const struct {
103 .bDescriptorType = USB_DT_ENDPOINT, 103 .bDescriptorType = USB_DT_ENDPOINT,
104 .bEndpointAddress = 1 | USB_DIR_IN, 104 .bEndpointAddress = 1 | USB_DIR_IN,
105 .bmAttributes = USB_ENDPOINT_XFER_BULK, 105 .bmAttributes = USB_ENDPOINT_XFER_BULK,
106 .wMaxPacketSize = htole16(512),
106 }, 107 },
107 .bulk_source = { 108 .bulk_source = {
108 .bLength = sizeof(descriptors.hs_descs.bulk_source), 109 .bLength = sizeof(descriptors.hs_descs.bulk_source),
109 .bDescriptorType = USB_DT_ENDPOINT, 110 .bDescriptorType = USB_DT_ENDPOINT,
110 .bEndpointAddress = 2 | USB_DIR_OUT, 111 .bEndpointAddress = 2 | USB_DIR_OUT,
111 .bmAttributes = USB_ENDPOINT_XFER_BULK, 112 .bmAttributes = USB_ENDPOINT_XFER_BULK,
113 .wMaxPacketSize = htole16(512),
112 }, 114 },
113 }, 115 },
114}; 116};
diff --git a/tools/usb/ffs-aio-example/simple/host_app/test.c b/tools/usb/ffs-aio-example/simple/host_app/test.c
index acd6332811f3..aed86ffff280 100644
--- a/tools/usb/ffs-aio-example/simple/host_app/test.c
+++ b/tools/usb/ffs-aio-example/simple/host_app/test.c
@@ -33,11 +33,6 @@
33#define VENDOR 0x1d6b 33#define VENDOR 0x1d6b
34#define PRODUCT 0x0105 34#define PRODUCT 0x0105
35 35
36/* endpoints indexes */
37
38#define EP_BULK_IN (1 | LIBUSB_ENDPOINT_IN)
39#define EP_BULK_OUT (2 | LIBUSB_ENDPOINT_OUT)
40
41#define BUF_LEN 8192 36#define BUF_LEN 8192
42 37
43/* 38/*
@@ -159,16 +154,24 @@ void test_exit(struct test_state *state)
159int main(void) 154int main(void)
160{ 155{
161 struct test_state state; 156 struct test_state state;
157 struct libusb_config_descriptor *conf;
158 struct libusb_interface_descriptor const *iface;
159 unsigned char in_addr, out_addr;
162 160
163 if (test_init(&state)) 161 if (test_init(&state))
164 return 1; 162 return 1;
165 163
164 libusb_get_config_descriptor(state.found, 0, &conf);
165 iface = &conf->interface[0].altsetting[0];
166 in_addr = iface->endpoint[0].bEndpointAddress;
167 out_addr = iface->endpoint[1].bEndpointAddress;
168
166 while (1) { 169 while (1) {
167 static unsigned char buffer[BUF_LEN]; 170 static unsigned char buffer[BUF_LEN];
168 int bytes; 171 int bytes;
169 libusb_bulk_transfer(state.handle, EP_BULK_IN, buffer, BUF_LEN, 172 libusb_bulk_transfer(state.handle, in_addr, buffer, BUF_LEN,
170 &bytes, 500); 173 &bytes, 500);
171 libusb_bulk_transfer(state.handle, EP_BULK_OUT, buffer, BUF_LEN, 174 libusb_bulk_transfer(state.handle, out_addr, buffer, BUF_LEN,
172 &bytes, 500); 175 &bytes, 500);
173 } 176 }
174 test_exit(&state); 177 test_exit(&state);