int comcerto_xhci_bus_suspend(struct usb_hcd *hcd) { int error_status = 0; int val; if (usb3_suspended) { pr_err("comcerto_xhci_bus_suspend: USB 3.0 Already Suspended \n"); return error_status; } error_status = xhci_bus_suspend(hcd); if (!error_status) { /* APPLYING THE RESET TO USB3 UTMI */ c2000_block_reset(COMPONENT_UTMI_USB1, 1); /* APPLYING THE RESET TO USB3 PHY */ c2000_block_reset(COMPONENT_USB1_PHY, 1); /* Disable the Clock */ clk_disable(usb3_clk); usb3_suspended = 1; } return error_status; }
static int mxhci_hsic_bus_suspend(struct usb_hcd *hcd) { struct mxhci_hsic_hcd *mxhci = hcd_to_hsic(hcd->primary_hcd); int ret; /* don't miss connect bus state from peripheral for USB 2.0 root hub */ if (usb_hcd_is_primary_hcd(hcd) && !(readl_relaxed(MSM_HSIC_PORTSC) & PORT_PE)) { dev_err(mxhci->dev, "%s: port is not enabled; skip suspend\n", __func__); return -EAGAIN; } ret = xhci_bus_suspend(hcd); xhci_dbg_log_event(&dbg_hsic, NULL, "Suspend RH", ret); return ret; }