Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22050
b: refs/heads/master
c: 1c05ad4
h: refs/heads/master
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Mar 20, 2006
1 parent a41596b commit d924031
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7802ac5c29d135345db1b06f9167075cd9f2d675
refs/heads/master: 1c05ad4447e4ecbd61647c102fb6f2f5a6634ff3
8 changes: 8 additions & 0 deletions trunk/drivers/usb/gadget/ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address");
#define DEV_CONFIG_CDC
#endif

#ifdef CONFIG_USB_GADGET_MUSBHSFC
#define DEV_CONFIG_CDC
#endif

#ifdef CONFIG_USB_GADGET_MUSBHDRC
#define DEV_CONFIG_CDC
#endif


/* For CDC-incapable hardware, choose the simple cdc subset.
* Anything that talks bulk (without notable bugs) can do this.
Expand Down
30 changes: 28 additions & 2 deletions trunk/drivers/usb/gadget/gadget_chips.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* gadget drivers or other code that needs to deal with them, and which
* autoconfigures instead of using early binding to the hardware.
*
* This could eventually work like the ARM mach_is_*() stuff, driven by
* This SHOULD eventually work like the ARM mach_is_*() stuff, driven by
* some config file that gets updated as new hardware is supported.
* (And avoiding the runtime comparisons in typical one-choice cases.)
* (And avoiding all runtime comparisons in typical one-choice configs!)
*
* NOTE: some of these controller drivers may not be available yet.
*/
Expand Down Expand Up @@ -93,6 +93,26 @@
#define gadget_is_imx(g) 0
#endif

/* Mentor high speed function controller */
#ifdef CONFIG_USB_GADGET_MUSBHSFC
#define gadget_is_musbhsfc(g) !strcmp("musbhsfc_udc", (g)->name)
#else
#define gadget_is_musbhsfc(g) 0
#endif

/* Mentor high speed "dual role" controller, peripheral mode */
#ifdef CONFIG_USB_GADGET_MUSBHDRC
#define gadget_is_musbhdrc(g) !strcmp("musbhdrc_udc", (g)->name)
#else
#define gadget_is_musbhdrc(g) 0
#endif

#ifdef CONFIG_USB_GADGET_MPC8272
#define gadget_is_mpc8272(g) !strcmp("mpc8272_udc", (g)->name)
#else
#define gadget_is_mpc8272(g) 0
#endif

// CONFIG_USB_GADGET_SX2
// CONFIG_USB_GADGET_AU1X00
// ...
Expand Down Expand Up @@ -143,5 +163,11 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
return 0x13;
else if (gadget_is_imx(gadget))
return 0x14;
else if (gadget_is_musbhsfc(gadget))
return 0x15;
else if (gadget_is_musbhdrc(gadget))
return 0x16;
else if (gadget_is_mpc8272(gadget))
return 0x17;
return -ENOENT;
}

0 comments on commit d924031

Please sign in to comment.