usb: dwc3: DWC_usb31 controller check
Add a convenience function to check if the controller is DWC_usb31. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <balbi@kernel.org> Change-Id: I2f9080a4a54269790e3594d0e61a76bd37d8b2c9 Git-commit: c4137a9c841ec7fb300782d211f2d6907f4d6e20 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
parent
e63417d73c
commit
fc1a0913c1
1 changed files with 6 additions and 0 deletions
|
@ -1175,6 +1175,12 @@ struct dwc3_gadget_ep_cmd_params {
|
|||
void dwc3_set_mode(struct dwc3 *dwc, u32 mode);
|
||||
int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc);
|
||||
|
||||
/* check whether we are on the DWC_usb31 core */
|
||||
static inline bool dwc3_is_usb31(struct dwc3 *dwc)
|
||||
{
|
||||
return !!(dwc->revision & DWC3_REVISION_IS_DWC31);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_USB_DWC3_HOST) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)
|
||||
int dwc3_host_init(struct dwc3 *dwc);
|
||||
void dwc3_host_exit(struct dwc3 *dwc);
|
||||
|
|
Loading…
Add table
Reference in a new issue