/* Reads the OTG Interrupt Register (GOTCTL) to determine whether this is a Device to Host Mode transition or a Host to Device Mode transition. This only occurs when the cable is connected/removed from the PHY connector.  */
static void dwc2_handle_conn_id_status_change_intr(struct dwc2_hsotg *hsotg)
/* Reads the OTG Interrupt Register (GOTCTL) to determine whether this is a Device to Host Mode transition or a Host to Device Mode transition. This only occurs when the cable is connected/removed from the PHY connector.  */
static void dwc2_handle_conn_id_status_change_intr(struct dwc2_hsotg *hsotg)
{
	u32 gintmsk = readl(hsotg->regs + GINTMSK);
	gintmsk &= ~GINTSTS_SOF;
	writel(gintmsk, hsotg->regs + GINTMSK);
	dev_dbg(hsotg->dev, " ++Connector ID Status Change Interrupt++  (%s)\n",
		dwc2_is_host_mode(hsotg) ? "Host" : "Device");
	spin_unlock(&hsotg->lock);
	queue_work(hsotg->wq_otg, &hsotg->wf_otg);
	spin_lock(&hsotg->lock);
	writel(GINTSTS_CONIDSTSCHNG, hsotg->regs + GINTSTS);
}