/* ******************************************************************************* * sw_usb_disable_ehci * * Description: * void * * Parameters: * void * * Return value: * void * * note: * void * ******************************************************************************* */ int sw_usb_disable_ehci(__u32 usbc_no) { struct sw_hci_hcd *sw_ehci = NULL; if(usbc_no != 1 && usbc_no != 2){ DMSG_PANIC("ERR:Argmen invalid. usbc_no(%d)\n", usbc_no); return -1; } sw_ehci = g_sw_ehci[usbc_no]; if(sw_ehci == NULL){ DMSG_PANIC("ERR: sw_ehci is null\n"); return -1; } if(sw_ehci->host_init_state){ DMSG_PANIC("ERR: not support sw_usb_disable_ehci\n"); return -1; } if(sw_ehci->probe == 0){ DMSG_PANIC("ERR: sw_ehci is disable, can not disable again\n"); return -1; } sw_ehci->probe = 0; DMSG_INFO("[%s]: sw_usb_disable_ehci\n", sw_ehci->hci_name); sw_ehci_hcd_remove(sw_ehci->pdev); return 0; }
int sw_usb_disable_ehci(__u32 usbc_no) { struct sw_hci_hcd *sw_ehci = NULL; if (usbc_no != 1 && usbc_no != 2) return -EINVAL; sw_ehci = g_sw_ehci[usbc_no]; if (sw_ehci == NULL) return -EFAULT; if (sw_ehci->host_init_state) return -ENOSYS; if (sw_ehci->probe == 0) return -ENOSYS; sw_ehci->probe = 0; pr_info("[%s]: disable ehci\n", sw_ehci->hci_name); sw_ehci_hcd_remove(sw_ehci->pdev); return 0; }