int emapi_sdio_init(unsigned long arg) { int rc = 0; unsigned long cmd; get_user(cmd, (unsigned long *) arg); switch (cmd) { case 0: #ifdef CONFIG_WIFI_CONTROL_FUNC wifi_add_dev(); #else printk(KERN_CRIT "EMAPI: fail to power on\n"); #endif mdelay(50); break; case 1: if (emapi.sdio_status) sdio_unregister_driver(&emapi_sdio_drv); #ifdef CONFIG_WIFI_CONTROL_FUNC wifi_del_dev(); #else printk(KERN_CRIT "EMAPI: fail to power off\n"); #endif emapi.sdio_status = 0; mdelay(50); break; case 2: rc = sdio_register_driver(&emapi_sdio_drv); if (rc < 0) { printk("emapi sdio driver init error\n"); goto error; } emapi.sdio_status = 1; break; default: printk("unkown command\n"); rc = -EINVAL; goto error; }; return rc; error: if (emapi_sdio_drv.drv.bus != NULL) sdio_unregister_driver(&emapi_sdio_drv); #ifdef CONFIG_WIFI_CONTROL_FUNC wifi_del_dev(); #else printk(KERN_CRIT "EMAPI: fail to power off\n"); #endif return rc; }
static void __exit rtw_drv_halt(void) { // DBG_871X(KERN_INFO "+%s", __func__); RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("+rtw_drv_halt\n")); rtw_suspend_lock_uninit(); drvpriv.drv_registered = _FALSE; sdio_unregister_driver(&drvpriv.r871xs_drv); #if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT) _rtw_mutex_free(&drvpriv.h2c_fwcmd_mutex); _rtw_mutex_free(&drvpriv.setch_mutex); _rtw_mutex_free(&drvpriv.setbw_mutex); _rtw_mutex_free(&drvpriv.hw_init_mutex); #endif #if defined(CONFIG_MMC_SUNXI_POWER_CONTROL) sunximmc_rescan_card(SDIOID, 0); rtl8189es_sdio_poweroff(); printk("[rtl8189es] %s: remove card, power off.\n", __FUNCTION__); #endif // DBG_871X(KERN_INFO "-%s", __func__); RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("-rtw_drv_halt\n")); }
void HIFShutDownDevice(HIF_DEVICE *device) { AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +HIFShutDownDevice\n")); if (device != NULL) { AR_DEBUG_ASSERT(device->func != NULL); } else { /* since we are unloading the driver anyways, reset all cards in case the SDIO card * is externally powered and we are unloading the SDIO stack. This avoids the problem when * the SDIO stack is reloaded and attempts are made to re-enumerate a card that is already * enumerated */ AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: HIFShutDownDevice, resetting\n")); ResetAllCards(); /* Unregister with bus driver core */ if (registered) { registered = 0; AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Unregistering with the bus driver\n")); sdio_unregister_driver(&ar6k_driver); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Unregistered\n")); } } AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -HIFShutDownDevice\n")); }
/* * This function cleans up the SDIO driver. * * The following major steps are followed for cleanup - * - Resume the device if its suspended * - Disconnect the device if connected * - Shutdown the firmware * - Unregister the device from SDIO bus. */ static void mwifiex_sdio_cleanup_module(void) { struct mwifiex_adapter *adapter = g_adapter; int i; if (down_interruptible(&add_remove_card_sem)) goto exit_sem_err; if (!adapter || !adapter->priv_num) goto exit; if (adapter->is_suspended) mwifiex_sdio_resume(adapter->dev); for (i = 0; i < adapter->priv_num; i++) if ((GET_BSS_ROLE(adapter->priv[i]) == MWIFIEX_BSS_ROLE_STA) && adapter->priv[i]->media_connected) mwifiex_deauthenticate(adapter->priv[i], NULL); if (!adapter->surprise_removed) mwifiex_init_shutdown_fw(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY), MWIFIEX_FUNC_SHUTDOWN); exit: up(&add_remove_card_sem); exit_sem_err: sdio_unregister_driver(&mwifiex_sdio); }
/* Init Module function -> Called by insmod */ static int __init cw1200_sdio_init(void) { const struct cw1200_platform_data *pdata; int ret; pdata = cw1200_get_platform_data(); ret = sdio_register_driver(&sdio_driver); if (ret) goto err_reg; if (pdata->power_ctrl) { ret = pdata->power_ctrl(pdata, true); if (ret) goto err_power; } ret = cw1200_sdio_on(pdata); if (ret) goto err_on; return 0; err_on: if (pdata->power_ctrl) pdata->power_ctrl(pdata, false); err_power: sdio_unregister_driver(&sdio_driver); err_reg: return ret; }
//static //void __exit mtlte_sys_sdio_driver_exit(void) void mtlte_sys_sdio_driver_exit(void) { KAL_RAWPRINT(("[EXIT] =======> lte_sdio_driver_exit\n")); sdio_onoff_module_exit(); KAL_DESTROYMUTEX(<e_dev.thread_kick_lock) ; sdio_unregister_driver(&mtlte_driver); KAL_RAWPRINT(("[EXIT] sdio_unregister_driver OK. \n")); #if EMCS_SDIO_DRVTST mtlte_dev_test_drvdeinit() ; KAL_RAWPRINT(("[EXIT] mtlte_dev_test_drvdeinit OK. \n")); #endif /* denit the expt layer */ mtlte_expt_deinit() ; KAL_RAWPRINT(("[EXIT] mtlte_expt_deinit OK. \n")); /* denit the data flow layer */ mtlte_df_deinit() ; KAL_RAWPRINT(("[EXIT] mtlte_df_deinit OK. \n")); /* denit the hif layer */ mtlte_hif_sdio_deinit() ; KAL_RAWPRINT(("[EXIT] mtlte_hif_sdio_deinit OK. \n")); #ifdef MT_LTE_AUTO_CALIBRATION autok_module_exit(); #endif KAL_RAWPRINT(("[EXIT] <======= lte_sdio_driver_exit\n")); }
/** * @brief This function de-registers the bt module in bus driver. * * @return N/A */ void sbi_unregister(void) { ENTER(); unregister = TRUE; sdio_unregister_driver(&sdio_bt); LEAVE(); }
int sdio_detect_exit(void) { g_func = NULL; //register to mmc driver sdio_unregister_driver(&mtk_sdio_client_drv); WMT_DETECT_INFO_FUNC("sdio_unregister_driver\n"); return 0; }
void sdio_function_cleanup(void) { sd_trace(("%s Enter\n", __func__)); sdio_unregister_driver(&bcmsdh_sdmmc_driver); kfree(gInstance); }
/* * module cleanup */ void bcmsdh_unregister_client_driver(void) { sdio_unregister_driver(&bcmsdh_sdmmc_driver); #ifdef GLOBAL_SDMMC_INSTANCE if (gInstance) kfree(gInstance); #endif }
/* Called at Driver Unloading */ static void __exit cw1200_sdio_exit(void) { const struct cw1200_platform_data *pdata; pdata = cw1200_get_platform_data(); sdio_unregister_driver(&sdio_driver); cw1200_sdio_off(pdata); if (pdata->power_ctrl) pdata->power_ctrl(pdata, false); }
/* Called at Driver Unloading */ static void __exit cw1200_sdio_exit(void) { const struct cw1200_platform_data_sdio *pdata; /* FIXME -- this won't support multiple devices */ pdata = global_plat_data; sdio_unregister_driver(&sdio_driver); cw1200_sdio_off(pdata); }
void brcmf_sdio_exit(void) { brcmf_dbg(SDIO, "Enter\n"); if (brcmfmac_sdio_pdata) platform_driver_unregister(&brcmf_sdio_pd); else sdio_unregister_driver(&brcmf_sdmmc_driver); }
static void __exit r8712s_drv_halt(void) { int ret; RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+8712_sdio - drv_halt\n")); sdio_unregister_driver(&drvpriv.r871xs_drv); // call r8712s_dev_remove() RT_TRACE(_module_hci_intfs_c_,_drv_err_,("-8712_sdio - drv_halt\n")); }
void linux_sdio_deinit(void *pv) { /** * TODO : **/ sdio_unregister_driver(&wilc_bus); }
/** * @brief This function de-registers the IF module in bus driver * * @return N/A */ void woal_bus_unregister(void) { ENTER(); /* SDIO Driver Unregistration */ sdio_unregister_driver(&wlan_sdio); LEAVE(); }
static int brcmf_sdio_pd_remove(struct platform_device *pdev) { brcmf_dbg(SDIO, "Enter\n"); if (brcmfmac_sdio_pdata->power_off) brcmfmac_sdio_pdata->power_off(); sdio_unregister_driver(&brcmf_sdmmc_driver); return 0; }
static void mwifiex_sdio_cleanup_module(void) { if (!down_interruptible(&add_remove_card_sem)) up(&add_remove_card_sem); user_rmmod = 1; sdio_unregister_driver(&mwifiex_sdio); }
/* * This function cleans up the SDIO driver. * * The following major steps are followed for cleanup - * - Resume the device if its suspended * - Disconnect the device if connected * - Shutdown the firmware * - Unregister the device from SDIO bus. */ static void mwifiex_sdio_cleanup_module(void) { if (!down_interruptible(&add_remove_card_sem)) up(&add_remove_card_sem); /* Set the flag as user is removing this module. */ user_rmmod = 1; sdio_unregister_driver(&mwifiex_sdio); }
void bcmsdio_unreg_driver(void) { if(g_irq_num >= 0) { platform_driver_unregister(&wimax_device); platform_device_unregister(&p_wimax_device); } sdio_unregister_driver(&bcmsdio_driver); platform_deinit_notifier(); probe_notifier = NULL; remove_notifier = NULL; platform_deinit_notifier = NULL; }
void sdio_function_cleanup(void) { sd_trace(("%s Enter\n", __FUNCTION__)); sdio_unregister_driver(&bcmsdh_sdmmc_driver); #ifdef ANDROID_SPECIFIC wifi_power(FALSE); #endif if (gInstance) kfree(gInstance); }
/*----------------------------------------------------------------------------*/ VOID glUnregisterBus(remove_card pfRemove) { ASSERT(pfRemove); pfRemove(); #if MTK_WCN_HIF_SDIO /* unregister MTK sdio client */ mtk_wcn_hif_sdio_client_unreg(&cltInfo); #else sdio_unregister_driver(&mtk_sdio_driver); #endif return; } /* end of glUnregisterBus() */
static void __exit rtw_drv_halt(void) { rtw_suspend_lock_uninit(); // DBG_871X(KERN_INFO "+%s", __func__); RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("+rtw_drv_halt\n")); sdio_unregister_driver(&drvpriv.r871xs_drv); #if defined(CONFIG_MMC_SUNXI_POWER_CONTROL) sunximmc_rescan_card(SDIOID, 0); rtl8723as_sdio_poweroff(); printk("[rtl8723as] %s: remove card, power off.\n", __FUNCTION__); #endif // DBG_871X(KERN_INFO "-%s", __func__); RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("-rtw_drv_halt\n")); }
static int wimax_remove(struct platform_device *pdev) { struct wimax732_platform_data *pdata = pdev->dev.platform_data; dump_debug("SDIO driver Uninstall"); /* destroy wake locks */ wake_lock_destroy(&pdata->g_cfg->wimax_wake_lock); wake_lock_destroy(&pdata->g_cfg->wimax_rxtx_lock); wake_lock_destroy(&pdata->g_cfg->wimax_tx_lock); class_destroy(pdata->wimax_class); cmc7xx_unregister_pm_notifier(pdata); sdio_unregister_driver(&adapter_driver); misc_deregister(&pdata->swmxctl_dev); mutex_destroy(&pdata->g_cfg->rx_lock); mutex_destroy(&pdata->g_cfg->power_mutex); return 0; }
void sdio_function_cleanup(void) { sd_trace(("%s Enter\n", __FUNCTION__)); #if defined(CONFIG_BRCM_LGE_WL_HOSTWAKEUP) sdio_claim_host(gInstance->func[0]); dhd_enable_sdio_irq(FALSE); sdio_release_host(gInstance->func[0]); dhd_unregister_early_suspend(); dhd_suspend_context = TRUE; #endif /* defined(CONFIG_BRCM_LGE_WL_HOSTWAKEUP) */ sdio_unregister_driver(&bcmsdh_sdmmc_driver); if (gInstance) kfree(gInstance); }
static void /*__exit*/ esp_sdio_exit(void) { esp_dbg(ESP_SHOW, "%s \n", __func__); esp_debugfs_exit(); esp_unregister_early_suspend(); sdio_unregister_driver(&esp_sdio_driver); sif_platform_rescan_card(0); #ifndef FPGA_DEBUG sif_platform_target_poweroff(); #endif /* !FPGA_DEBUG */ esp_wakelock_destroy(); }
static void __exit rtw_drv_halt(void) { // DBG_871X(KERN_INFO "+%s", __func__); RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("+rtw_drv_halt\n")); rtw_suspend_lock_uninit(); drvpriv.drv_registered = _FALSE; sdio_unregister_driver(&drvpriv.r871xs_drv); #if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT) _rtw_mutex_free(&drvpriv.h2c_fwcmd_mutex); _rtw_mutex_free(&drvpriv.setch_mutex); _rtw_mutex_free(&drvpriv.setbw_mutex); _rtw_mutex_free(&drvpriv.hw_init_mutex); #endif // DBG_871X(KERN_INFO "-%s", __func__); RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("-rtw_drv_halt\n")); }
static void emapi_exit_module(void) { if (emapi.sdio_status) sdio_unregister_driver(&emapi_sdio_drv); #ifdef CONFIG_WIFI_CONTROL_FUNC wifi_del_dev(); #else printk(KERN_CRIT "EMAPI: fail to power off\n"); #endif #if 1 if (misc_deregister(&emapi_device)) printk("emapi: deregister fail\n"); #else class_destroy(emapi.emapi_class); device_destroy(emapi.emapi_class, 0); unregister_chrdev_region(emapi.emapi_cdevno, 1); #endif remove_proc_entry("emapi_calibration", NULL); }
/* * module cleanup */ void bcmsdh_unregister_client_driver(void) { sdio_unregister_driver(&bcmsdh_sdmmc_driver); }
void sdio_func_unreg_notify(void) { OSL_SLEEP(15); sdio_unregister_driver(&dummy_sdmmc_driver); }