UPSTREAM: usb: gadget: Add gadget_is_cdns3() macro
Add a new bcdDevice entry for Cadence USB gadget controller similar to other controller and add gadget_is_cdns3() macro as well. Conflicts: drivers/usb/gadget/gadget_chips.h Change-Id: I9be2baf3a8b57a0b1fb9116f51a04a71d59bb5f0 Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit d80effb1847822e521cda17b4c73c83629b035d0)
This commit is contained in:
parent
5cec6cdf3e
commit
349befe519
|
|
@ -149,13 +149,11 @@
|
|||
#define gadget_is_dwc3(g) 0
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* CONFIG_USB_GADGET_SX2
|
||||
* CONFIG_USB_GADGET_AU1X00
|
||||
* ...
|
||||
*/
|
||||
#ifdef CONFIG_USB_CDNS3_GADGET
|
||||
#define gadget_is_cdns3(g) (!strcmp("cdns3-gadget", (g)->name))
|
||||
#else
|
||||
#define gadget_is_cdns3(g) 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* usb_gadget_controller_number - support bcdDevice id convention
|
||||
|
|
@ -216,5 +214,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
|
|||
return 0x22;
|
||||
else if (gadget_is_dwc3(gadget))
|
||||
return 0x23;
|
||||
else if (gadget_is_cdns3(gadget))
|
||||
return 0x24;
|
||||
return -ENOENT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue