summaryrefslogtreecommitdiffstats
path: root/include/usb
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-17 07:53:09 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-22 08:09:28 +0200
commit62735eec55c5fbe5609d3f0d2217e941d49277be (patch)
tree18adf87dcfd056128e69df56ff4a030b624b9422 /include/usb
parent32f4bd130c9c46ad7404a3e600dcea8d05008d32 (diff)
downloadbarebox-62735eec55c5fbe5609d3f0d2217e941d49277be.tar.gz
barebox-62735eec55c5fbe5609d3f0d2217e941d49277be.tar.xz
USB: gadget: specify vendor/product id with device parameters
This introduces the device parameters: usbgadget.product usbgadget.vendor usbgadget.manufacturer usbgadget.productname These variables are used to configure the USB vendor id, product id, manufacturer name and product name. Previously these were configured with arguments to the usbserial and dfu command. The parameters are device static, so it's nice to configure it somewhere in the environment instead of when calling dfu/usbserial. Also when other gadget drivers are added we do not have to duplicate the option parsing further. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/usb')
-rw-r--r--include/usb/dfu.h5
-rw-r--r--include/usb/gadget.h5
-rw-r--r--include/usb/usbserial.h4
3 files changed, 5 insertions, 9 deletions
diff --git a/include/usb/dfu.h b/include/usb/dfu.h
index df4f2fd4d6..461753443d 100644
--- a/include/usb/dfu.h
+++ b/include/usb/dfu.h
@@ -33,11 +33,6 @@ struct usb_dfu_dev {
};
struct usb_dfu_pdata {
- char *manufacturer;
- const char *productname;
- u16 idVendor;
- u16 idProduct;
-
struct usb_dfu_dev *alts;
int num_alts;
};
diff --git a/include/usb/gadget.h b/include/usb/gadget.h
index 8fd8b01f52..7106f9d788 100644
--- a/include/usb/gadget.h
+++ b/include/usb/gadget.h
@@ -554,6 +554,11 @@ struct usb_gadget {
unsigned a_hnp_support:1;
unsigned a_alt_hnp_support:1;
unsigned quirk_ep_out_aligned_size:1;
+
+ uint32_t vendor_id;
+ uint32_t product_id;
+ char *manufacturer;
+ char *productname;
};
#define work_to_gadget(w) (container_of((w), struct usb_gadget, work))
diff --git a/include/usb/usbserial.h b/include/usb/usbserial.h
index e047ca7e17..c537eba900 100644
--- a/include/usb/usbserial.h
+++ b/include/usb/usbserial.h
@@ -2,10 +2,6 @@
#define _USB_SERIAL_H
struct usb_serial_pdata {
- char *manufacturer;
- const char *productname;
- u16 idVendor;
- u16 idProduct;
bool acm;
};