Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4be01734 authored by John Youn's avatar John Youn Committed by Mayank Rana
Browse files

usb: dwc3: Add a check for the DWC_usb3 core



Add a helper function to check if we are running on a DWC_usb3 core.

Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Change-Id: Ic0c3810b798df8bf34a2ad7e1879884e7bf3c8f5
Git-commit: a987a906e95c4d80a364629d6bcb7cf69d2018e4
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[mrana@codeaurora.org: resolved merge conflicts]
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent fc1a0913
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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_usb3 core */
static inline bool dwc3_is_usb3(struct dwc3 *dwc)
{
	return !(dwc->revision & DWC3_REVISION_IS_DWC31);
}

/* check whether we are on the DWC_usb31 core */
static inline bool dwc3_is_usb31(struct dwc3 *dwc)
{