Commit b4f61c63 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB gadget: serial driver config update

There's a properly assigned vendor/product ID pair for this; use it.
Use new boolean CONFIG_* symbols.  For PXA/IXP, use the first two
endpoints.
parent feea32cf
...@@ -135,9 +135,6 @@ do { \ ...@@ -135,9 +135,6 @@ do { \
#define GS_NUM_PORTS 16 #define GS_NUM_PORTS 16
#define GS_VENDOR_ID 0x05F9
#define GS_PRODUCT_ID 0xFFFF
#define GS_NUM_CONFIGS 1 #define GS_NUM_CONFIGS 1
#define GS_NO_CONFIG_ID 0 #define GS_NO_CONFIG_ID 0
#define GS_BULK_CONFIG_ID 2 #define GS_BULK_CONFIG_ID 2
...@@ -187,7 +184,7 @@ static int debug = G_SERIAL_DEBUG; ...@@ -187,7 +184,7 @@ static int debug = G_SERIAL_DEBUG;
* DMA channels to manage their FIFOs. It supports high speed. * DMA channels to manage their FIFOs. It supports high speed.
* Those endpoints can be arranged in any desired configuration. * Those endpoints can be arranged in any desired configuration.
*/ */
#ifdef CONFIG_USB_G_SERIAL_NET2280 #ifdef CONFIG_USB_GADGET_NET2280
#define CHIP "net2280" #define CHIP "net2280"
#define EP0_MAXPACKET 64 #define EP0_MAXPACKET 64
static const char EP_OUT_NAME[] = "ep-a"; static const char EP_OUT_NAME[] = "ep-a";
...@@ -220,13 +217,13 @@ static inline void hw_optimize(struct usb_gadget *gadget) ...@@ -220,13 +217,13 @@ static inline void hw_optimize(struct usb_gadget *gadget)
* can't use altsettings or reset the interfaces independently. * can't use altsettings or reset the interfaces independently.
* So stick to a single interface. * So stick to a single interface.
*/ */
#ifdef CONFIG_USB_G_SERIAL_PXA2XX #ifdef CONFIG_USB_GADGET_PXA2XX
#define CHIP "pxa2xx" #define CHIP "pxa2xx"
#define EP0_MAXPACKET 16 #define EP0_MAXPACKET 16
static const char EP_OUT_NAME[] = "ep12out-bulk"; static const char EP_OUT_NAME[] = "ep2out-bulk";
#define EP_OUT_NUM 12 #define EP_OUT_NUM 2
static const char EP_IN_NAME[] = "ep11in-bulk"; static const char EP_IN_NAME[] = "ep1in-bulk";
#define EP_IN_NUM 11 #define EP_IN_NUM 1
#define SELFPOWER USB_CONFIG_ATT_SELFPOWER #define SELFPOWER USB_CONFIG_ATT_SELFPOWER
/* no hw optimizations to apply */ /* no hw optimizations to apply */
...@@ -245,7 +242,7 @@ static const char EP_IN_NAME[] = "ep11in-bulk"; ...@@ -245,7 +242,7 @@ static const char EP_IN_NAME[] = "ep11in-bulk";
* in special situations. So this is a case of "choose it right * in special situations. So this is a case of "choose it right
* during enumeration" ... * during enumeration" ...
*/ */
#ifdef CONFIG_USB_G_SERIAL_SA1100 #ifdef CONFIG_USB_GADGET_SA1100
#define CHIP "sa1100" #define CHIP "sa1100"
#define EP0_MAXPACKET 8 #define EP0_MAXPACKET 8
static const char EP_OUT_NAME[] = "ep1out-bulk"; static const char EP_OUT_NAME[] = "ep1out-bulk";
...@@ -264,7 +261,7 @@ static const char EP_IN_NAME [] = "ep2in-bulk"; ...@@ -264,7 +261,7 @@ static const char EP_IN_NAME [] = "ep2in-bulk";
* *
* This has three semi-configurable full speed bulk/interrupt endpoints. * This has three semi-configurable full speed bulk/interrupt endpoints.
*/ */
#ifdef CONFIG_USB_G_SERIAL_GOKU #ifdef CONFIG_USB_GADGET_GOKU
#define CHIP "goku" #define CHIP "goku"
#define DRIVER_VERSION_NUM 0x0116 #define DRIVER_VERSION_NUM 0x0116
#define EP0_MAXPACKET 8 #define EP0_MAXPACKET 8
...@@ -302,6 +299,14 @@ static const char EP_IN_NAME [] = "ep2-bulk"; ...@@ -302,6 +299,14 @@ static const char EP_IN_NAME [] = "ep2-bulk";
/* else value must be USB_CONFIG_ATT_WAKEUP */ /* else value must be USB_CONFIG_ATT_WAKEUP */
#endif #endif
/* Thanks to NetChip Technologies for donating this product ID.
*
* DO NOT REUSE THESE IDs with a protocol-incompatible driver!! Ever!!
* Instead: allocate your own, using normal USB-IF procedures.
*/
#define GS_VENDOR_ID 0x0525 /* NetChip */
#define GS_PRODUCT_ID 0xa4a6 /* Linux-USB Serial Gadget */
/* Structures */ /* Structures */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment