コード例 #1
0
ファイル: mt_wifi_chrdev.c プロジェクト: 23171580/ralink
static int WIFI_func_ctrl(unsigned int on)
{
    WIFI_ERR_FUNC("WIFI_func_ctrl GPIO_COMBO_PMU_EN_PIN(%d)\n", GPIO_COMBO_PMU_EN_PIN);
	if (on == 1) {
		io_set_output_mode(GPIO_COMBO_RST_PIN);
		io_set_output_high(GPIO_COMBO_RST_PIN);
		/* PMU_EN_WIFI RST_N */
        	io_set_output_mode(GPIO_COMBO_PMU_EN_PIN);
       		io_set_output_low(GPIO_COMBO_PMU_EN_PIN);

		//io_set_output_mode(GPIO_COMBO_RST_PIN);
        	//io_set_output_low(GPIO_COMBO_RST_PIN);
		//mdelay(10);

		//io_set_output_high(GPIO_COMBO_RST_PIN);
		//mdelay(5);

		io_set_output_high(GPIO_COMBO_PMU_EN_PIN); //GPIO_GPS_SYNC_PIN
		mdelay(5);
		mt_wifi_register_to_sdio();
		board_sdio_ctrl(1, 3);
	} else if (on == 0) {
		board_sdio_ctrl(1, 2);
		mt_wifi_unregister_to_sdio();
		io_set_output_low(GPIO_COMBO_PMU_EN_PIN);
	} else {
		WIFI_ERR_FUNC("Control Not support (%d)\n",on);
	}
	return 0;
}
コード例 #2
0
int wmt_detect_sdio_pwr_ctrl (int on)
{
	int retval = -1;
#ifdef MTK_WCN_COMBO_CHIP_SUPPORT	
	if (0 == on)
	{
		/*power off SDIO slot*/
		retval = board_sdio_ctrl(1, 0);
	}
	else
	{
		/*power on SDIO slot*/
		retval = board_sdio_ctrl(1, 1);
	}
#else
	WMT_DETECT_WARN_FUNC("WMT-DETECT: MTK_WCN_COMBO_CHIP_SUPPORT is not set\n");
#endif
	return retval;
}
コード例 #3
0
ファイル: wmt_plat_alps.c プロジェクト: KhioGie/imo_s88_kk
INT32 wmt_plat_sdio_ctrl (WMT_SDIO_SLOT_NUM sdioPortType, ENUM_FUNC_STATE on)
{
    return board_sdio_ctrl(sdioPortType, (FUNC_OFF == on) ? 0 : 1);
}