/* Caller should take care of locking. This function will return the link state on success (>= 0) or -ETIMEDOUT.  */
int dwc3_gadget_get_link_state(struct dwc3 *dwc)
/* Caller should take care of locking. This function will return the link state on success (>= 0) or -ETIMEDOUT.  */
int dwc3_gadget_get_link_state(struct dwc3 *dwc)
{
	u32		reg;
	reg = dwc3_readl(dwc->regs, DWC3_DSTS);
	return DWC3_DSTS_USBLNKST(reg);
}