mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-27 16:01:27 +00:00
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. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
This commit is contained in:
parent
a9ca4193bd
commit
d80effb184
1 changed files with 8 additions and 0 deletions
|
@ -149,6 +149,12 @@
|
||||||
#define gadget_is_dwc3(g) 0
|
#define gadget_is_dwc3(g) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#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
|
* usb_gadget_controller_number - support bcdDevice id convention
|
||||||
* @gadget: the controller being driven
|
* @gadget: the controller being driven
|
||||||
|
@ -208,5 +214,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
|
||||||
return 0x22;
|
return 0x22;
|
||||||
else if (gadget_is_dwc3(gadget))
|
else if (gadget_is_dwc3(gadget))
|
||||||
return 0x23;
|
return 0x23;
|
||||||
|
else if (gadget_is_cdns3(gadget))
|
||||||
|
return 0x24;
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue