Skip to content

Commit

Permalink
USB: update gadget files for fsl_usb2_udc driver
Browse files Browse the repository at this point in the history
Update gadget_chip.c, ether.c for newly added Freescale Highspeed USB
device driver.

Signed-off-by: Li Yang <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Li Yang authored and gregkh committed Apr 27, 2007
1 parent b504882 commit d2eef1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/usb/gadget/ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address");
#define DEV_CONFIG_CDC
#endif

#ifdef CONFIG_USB_GADGET_FSL_USB2
#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
8 changes: 8 additions & 0 deletions drivers/usb/gadget/gadget_chips.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@
#define gadget_is_imx(g) 0
#endif

#ifdef CONFIG_USB_GADGET_FSL_USB2
#define gadget_is_fsl_usb2(g) !strcmp("fsl-usb2-udc", (g)->name)
#else
#define gadget_is_fsl_usb2(g) 0
#endif

/* Mentor high speed function controller */
#ifdef CONFIG_USB_GADGET_MUSBHSFC
#define gadget_is_musbhsfc(g) !strcmp("musbhsfc_udc", (g)->name)
Expand Down Expand Up @@ -177,5 +183,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
return 0x17;
else if (gadget_is_husb2dev(gadget))
return 0x18;
else if (gadget_is_fsl_usb2(gadget))
return 0x19;
return -ENOENT;
}

0 comments on commit d2eef1f

Please sign in to comment.