Esempio n. 1
0
static int cw1200_sdio_reset(struct sbus_priv *self)
{
	cw1200_sdio_off(self->pdata);
	msleep(1000);
	cw1200_sdio_on(self->pdata);
	return 0;
}
Esempio n. 2
0
/* 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);
}
Esempio n. 3
0
/* 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);
}
Esempio n. 4
0
/* Init Module function -> Called by insmod */
static int __init cw1200_sdio_init(void)
{
	const struct cw1200_platform_data_sdio *pdata;
	int ret;

	/* FIXME -- this won't support multiple devices */
	pdata = global_plat_data;

	if (cw1200_sdio_on(pdata)) {
		ret = -1;
		goto err;
	}

	ret = sdio_register_driver(&sdio_driver);
	if (ret)
		goto err;

	return 0;

err:
	cw1200_sdio_off(pdata);
	return ret;
}