static int __init macallan_wifi_init(void) { int rc; rc = gpio_request(MACALLAN_WLAN_PWR, "wlan_power"); if (rc) pr_err("WLAN_PWR gpio request failed:%d\n", rc); rc = gpio_request(MACALLAN_WLAN_RST, "wlan_rst"); if (rc) pr_err("WLAN_RST gpio request failed:%d\n", rc); rc = gpio_request(MACALLAN_WLAN_WOW, "bcmsdh_sdmmc"); if (rc) pr_err("WLAN_WOW gpio request failed:%d\n", rc); rc = gpio_direction_output(MACALLAN_WLAN_PWR, 0); if (rc) pr_err("WLAN_PWR gpio direction configuration failed:%d\n", rc); rc = gpio_direction_output(MACALLAN_WLAN_RST, 0); if (rc) pr_err("WLAN_RST gpio direction configuration failed:%d\n", rc); rc = gpio_direction_input(MACALLAN_WLAN_WOW); if (rc) pr_err("WLAN_WOW gpio direction configuration failed:%d\n", rc); macallan_wl12xx_wlan_data.irq = gpio_to_irq(MACALLAN_WLAN_WOW); wl12xx_set_platform_data(&macallan_wl12xx_wlan_data); return 0; }
static void __init pandora_wl1251_init(void) { struct wl12xx_platform_data pandora_wl1251_pdata; int ret; memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata)); ret = gpio_request_one(PANDORA_WIFI_IRQ_GPIO, GPIOF_IN, "wl1251 irq"); if (ret < 0) goto fail; pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO); if (pandora_wl1251_pdata.irq < 0) goto fail_irq; pandora_wl1251_pdata.use_eeprom = true; ret = wl12xx_set_platform_data(&pandora_wl1251_pdata); if (ret < 0) goto fail_irq; return; fail_irq: gpio_free(PANDORA_WIFI_IRQ_GPIO); fail: printk(KERN_ERR "wl1251 board initialisation failed\n"); }
static int __init enterprise_wifi_init(void) { int rc; rc = gpio_request(ENTERPRISE_WLAN_PWR, "wlan_power"); if (rc) pr_err("WLAN_PWR gpio request failed:%d\n", rc); rc = gpio_request(ENTERPRISE_WLAN_RST, "wlan_rst"); if (rc) pr_err("WLAN_RST gpio request failed:%d\n", rc); rc = gpio_request(ENTERPRISE_WLAN_WOW, "bcmsdh_sdmmc"); if (rc) pr_err("WLAN_WOW gpio request failed:%d\n", rc); rc = gpio_direction_output(ENTERPRISE_WLAN_PWR, 0); if (rc) pr_err("WLAN_PWR gpio direction configuration failed:%d\n", rc); gpio_direction_output(ENTERPRISE_WLAN_RST, 0); if (rc) pr_err("WLAN_RST gpio direction configuration failed:%d\n", rc); rc = gpio_direction_input(ENTERPRISE_WLAN_WOW); if (rc) pr_err("WLAN_WOW gpio direction configuration failed:%d\n", rc); if (tegra_get_commchip_id() == COMMCHIP_TI_WL18XX) wl12xx_set_platform_data(&enterprise_wl12xx_wlan_data); else platform_device_register(&enterprise_brcm_wifi_device); return 0; }
static int __init kai_wifi_init(void) { int rc; rc = gpio_request(KAI_WLAN_EN, "wl12xx"); if (rc) pr_err("WLAN_EN gpio request failed:%d\n", rc); rc = gpio_request(KAI_WLAN_IRQ, "wl12xx"); if (rc) pr_err("WLAN_IRQ gpio request failed:%d\n", rc); tegra_gpio_enable(KAI_WLAN_EN); tegra_gpio_enable(KAI_WLAN_IRQ); rc = gpio_direction_output(KAI_WLAN_EN, 0); if (rc) pr_err("WLAN_EN gpio direction configuration failed:%d\n", rc); rc = gpio_direction_input(KAI_WLAN_IRQ); if (rc) pr_err("WLAN_IRQ gpio direction configuration failed:%d\n", rc); if (wl12xx_set_platform_data(&kai_wlan_data)) pr_err("Error setting wl12xx data\n"); return 0; }
static void __init omap4_panda_init(void) { int package = OMAP_PACKAGE_CBS; omap_emif_setup_device_details(&emif_devices, &emif_devices); if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, NULL, package); if (wl12xx_set_platform_data(&omap_panda_wlan_data)) pr_err("error setting wl12xx data\n"); omap4_panda_i2c_init(); omap4_audio_conf(); platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); /* * This is temporaray. With WLAN regsitering, we see that UART2 is not * idling on panda and CORE RET is not happening. So removing this FTM. * Later will be enabled. * * platform_device_register(&omap_vwlan_device); */ board_serial_init(); omap4_twl6030_hsmmc_init(mmc); omap4_ehci_init(); usb_musb_init(&musb_board_data); omap_dmm_init(); omap4_panda_display_init(); }
static int __init board_wifi_init(void) { const struct archos_wifi_bt_dev_conf *conf_ptr; conf_ptr = hwrev_ptr(&board_wifi_bt_config, system_rev); if (IS_ERR(conf_ptr)) return -EINVAL; /* bt */ wilink_pdata.nshutdown_gpio = conf_ptr->bt_power; remux_regulator_gpio(conf_ptr->bt_power); /* wifi */ if (conf_ptr->wifi_irq_signal) omap_mux_init_signal(conf_ptr->wifi_irq_signal, OMAP_PIN_INPUT); else omap_mux_init_gpio(conf_ptr->wifi_irq, OMAP_PIN_INPUT); board_wlan_data.irq = OMAP_GPIO_IRQ(conf_ptr->wifi_irq); if (conf_ptr->wifi_power_signal) omap_mux_init_signal(conf_ptr->wifi_power_signal, OMAP_PIN_OUTPUT); else omap_mux_init_gpio(conf_ptr->wifi_power, OMAP_PIN_OUTPUT); board_vwlan.gpio = conf_ptr->wifi_power; board_wifi_mux_init(); if (wl12xx_set_platform_data(&board_wlan_data)) pr_err("Error setting wl12xx data\n"); platform_device_register(&board_vwlan_device); return 0; }
static int __init enterprise_wifi_init(void) { int rc; rc = gpio_request(ENTERPRISE_WLAN_PWR, "wlan_power"); if (rc) pr_err("WLAN_PWR gpio request failed:%d\n", rc); rc = gpio_request(ENTERPRISE_WLAN_RST, "wlan_rst"); if (rc) pr_err("WLAN_RST gpio request failed:%d\n", rc); rc = gpio_request(ENTERPRISE_WLAN_WOW, "bcmsdh_sdmmc"); if (rc) pr_err("WLAN_WOW gpio request failed:%d\n", rc); tegra_gpio_enable(ENTERPRISE_WLAN_PWR); tegra_gpio_enable(ENTERPRISE_WLAN_RST); tegra_gpio_enable(ENTERPRISE_WLAN_WOW); rc = gpio_direction_output(ENTERPRISE_WLAN_PWR, 0); if (rc) pr_err("WLAN_PWR gpio direction configuration failed:%d\n", rc); gpio_direction_output(ENTERPRISE_WLAN_RST, 0); if (rc) pr_err("WLAN_RST gpio direction configuration failed:%d\n", rc); rc = gpio_direction_input(ENTERPRISE_WLAN_WOW); if (rc) pr_err("WLAN_WOW gpio direction configuration failed:%d\n", rc); /* HTC_WIFI_START */ // platform_device_register(&enterprise_wifi_device); if (wl12xx_set_platform_data(&enterprise_wlan_data)) pr_err("Error setting wl12xx_data\n"); /* HTC_WIFI_END */ return 0; }
static void __init omap4_panda_init(void) { int package = OMAP_PACKAGE_CBS; int ret; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, NULL, package); omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ); ret = wl12xx_set_platform_data(&omap_panda_wlan_data); if (ret) pr_err("error setting wl12xx data: %d\n", ret); omap4_panda_init_rev(); omap4_panda_i2c_init(); platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); platform_device_register(&omap_vwlan_device); omap_serial_init(); omap_sdrc_init(NULL, NULL); omap4_twl6030_hsmmc_init(mmc); omap4_ehci_init(); usb_musb_init(&musb_board_data); omap4_panda_display_init(); }
static void omap4_sdp4430_wifi_init(void) { omap4_sdp4430_wifi_mux_init(); if (wl12xx_set_platform_data(&omap4_sdp4430_wlan_data)) pr_err("Error setting wl12xx data\n"); platform_device_register(&omap_vwlan_device); }
static void omap4_4430sdp_wifi_init(void) { if (gpio_request(GPIO_WIFI_PMENA, "wl12xx") || gpio_direction_output(GPIO_WIFI_PMENA, 0)) pr_err("Error initializing up WLAN_EN\n"); if (wl12xx_set_platform_data(&omap4_panda_wlan_data)) pr_err("Error setting wl12xx data\n"); }
static void __init omap3_evm_init(void) { omap3_evm_get_revision(); if (cpu_is_omap3630()) omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB); else omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB); omap_board_config = omap3_evm_config; omap_board_config_size = ARRAY_SIZE(omap3_evm_config); omap3_evm_i2c_init(); omap_display_init(&omap3_evm_dss_data); omap_serial_init(); omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL); /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */ usb_nop_xceiv_register(); if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { /* enable EHCI VBUS using GPIO22 */ omap_mux_init_gpio(OMAP3_EVM_EHCI_VBUS, OMAP_PIN_INPUT_PULLUP); /* Select EHCI port on main board */ omap_mux_init_gpio(OMAP3_EVM_EHCI_SELECT, OMAP_PIN_INPUT_PULLUP); gpio_request_array(omap3_evm_ehci_gpios, ARRAY_SIZE(omap3_evm_ehci_gpios)); /* setup EHCI phy reset config */ omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP); usbhs_bdata.reset_gpio_port[1] = 21; /* EVM REV >= E can supply 500mA with EXTVBUS programming */ musb_board_data.power = 500; musb_board_data.extvbus = 1; } else { /* setup EHCI phy reset on MDC */ omap_mux_init_gpio(135, OMAP_PIN_OUTPUT); usbhs_bdata.reset_gpio_port[1] = 135; } usb_musb_init(&musb_board_data); usbhs_init(&usbhs_bdata); omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); omap3evm_init_smsc911x(); omap3_evm_display_init(); #ifdef CONFIG_WL12XX_PLATFORM_DATA /* WL12xx WLAN Init */ if (wl12xx_set_platform_data(&omap3evm_wlan_data)) pr_err("error setting wl12xx data\n"); platform_device_register(&omap3evm_wlan_regulator); #endif }
static void __init omap4_panda_init(void) { int package = OMAP_PACKAGE_CBS; int ret; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap_emif_set_device_details(1, &lpddr2_elpida_2G_S4_x2_info, lpddr2_elpida_2G_S4_timings, ARRAY_SIZE(lpddr2_elpida_2G_S4_timings), &lpddr2_elpida_S4_min_tck, &custom_configs); omap_emif_set_device_details(2, &lpddr2_elpida_2G_S4_x2_info, lpddr2_elpida_2G_S4_timings, ARRAY_SIZE(lpddr2_elpida_2G_S4_timings), &lpddr2_elpida_S4_min_tck, &custom_configs); if (cpu_is_omap446x()) gpio_leds[0].gpio = 110; omap4_mux_init(board_mux, NULL, package); omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ); omap_register_mac_device_fixup_paths(panda_fixup_mac_device_paths, ARRAY_SIZE(panda_fixup_mac_device_paths)); ret = wl12xx_set_platform_data(&omap_panda_wlan_data); if (ret) pr_err("error setting wl12xx data: %d\n", ret); omap4_panda_init_rev(); omap4_panda_i2c_init(); platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); platform_device_register(&omap_vwlan_device); omap_serial_init(); omap_sdrc_init(NULL, NULL); omap4_twl6030_hsmmc_init(mmc); omap4_ehci_init(); usb_musb_init(&musb_board_data); omap4_panda_display_init(); #ifdef CONFIG_MACH_OMAP4_PANDA_CAMERA_SUPPORT panda_camera_init(&panda_camera_board_info); #endif if (cpu_is_omap446x()) { /* Vsel0 = gpio, vsel1 = gnd */ ret = omap_tps6236x_board_setup(true, TPS62361_GPIO, -1, OMAP_PIN_OFF_OUTPUT_HIGH, -1); if (ret) pr_err("TPS62361 initialization failed: %d\n", ret); } omap_enable_smartreflex_on_init(); }
static void __init acclaim_wifi_init(void) { struct device *dev; struct omap_mmc_platform_data *pdata; int ret; printk(KERN_WARNING"%s: start\n", __func__); ret = gpio_request(GPIO_WIFI_PMENA, "wifi_pmena"); if (ret < 0) { pr_err("%s: can't reserve GPIO: %d\n", __func__, GPIO_WIFI_PMENA); goto out; } gpio_direction_output(GPIO_WIFI_PMENA, 0); gpio_export(GPIO_WIFI_PMENA, true); ret = gpio_request(GPIO_WIFI_PWEN, "wifi_pwen"); if (ret < 0) { pr_err("%s: can't reserve GPIO: %d\n", __func__, GPIO_WIFI_PWEN); goto out; } gpio_direction_output(GPIO_WIFI_PWEN, 0); gpio_export(GPIO_WIFI_PWEN, true); ret = gpio_request(GPIO_WIFI_IRQ, "wifi_irq"); if (ret < 0) { printk(KERN_ERR "%s: can't reserve GPIO: %d\n", __func__, GPIO_WIFI_IRQ); goto out; } gpio_direction_input(GPIO_WIFI_IRQ); dev = mmc[2].dev; if (!dev) { pr_err("wl12xx mmc device initialization failed\n"); goto out; } pdata = dev->platform_data; if (!pdata) { pr_err("Platfrom data of wl12xx device not set\n"); goto out; } pdata->slots[0].set_power = wl12xx_set_power; config_wlan_mux (); if (wl12xx_set_platform_data(&omap4_acclaim_wlan_data)) pr_err("Error setting wl12xx data\n"); out: return; }
void __init zoom_peripherals_init(void) { if (wl12xx_set_platform_data(&omap_zoom_wlan_data)) pr_err("error setting wl12xx data\n"); omap_i2c_init(); platform_device_register(&omap_vwlan_device); usb_musb_init(&musb_board_data); enable_board_wakeup_source(); omap_serial_init(); }
static void omap4_4430sdp_wifi_init(void) { platform_device_register(&vwlan_device); if (gpio_request(GPIO_WIFI_IRQ, "wl12xx") || gpio_direction_input(GPIO_WIFI_IRQ)) pr_err("Error initializing up WLAN_IRQ\n"); if (wl12xx_set_platform_data(&wlan_data)) pr_err("Error setting wl12xx data\n"); }
int __init bliss_wifi_init(void) { int ret=0; printk(KERN_INFO "%s: start\n", __func__); /* HTC_CSP_START */ //ruby_wifi_power(1); if(wl12xx_set_platform_data(&bliss_wlan_data)) pr_err("Error setting wl12xx_data\n"); /* HTC_CSP_END */ return ret; }
static void __init omap4_sdp4430_wifi_init(void) { int ret; omap4_sdp4430_wifi_mux_init(); ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data); if (ret) pr_err("Error setting wl12xx data: %d\n", ret); ret = platform_device_register(&omap_vwlan_device); if (ret) pr_err("Error registering wl12xx device: %d\n", ret); }
static int __init encore_wifi_init(void) { int ret; gpio_request(ENCORE_WIFI_ENPOW_GPIO, "wifi_en_pow"); encore_wifi_v18io_power_enable(); gpio_direction_output(ENCORE_WIFI_ENPOW_GPIO, 1); ret = wl12xx_set_platform_data(&encore_wlan_data); if (ret) pr_err("Error setting wl12xx data\n"); return ret; }
static void __init omap3_evm_wl12xx_init(void) { #ifdef CONFIG_WL12XX_PLATFORM_DATA int ret; /* WL12xx WLAN Init */ ret = wl12xx_set_platform_data(&omap3evm_wlan_data); if (ret) pr_err("error setting wl12xx data: %d\n", ret); ret = platform_device_register(&omap3evm_wlan_regulator); if (ret) pr_err("error registering wl12xx device: %d\n", ret); #endif }
static void omap4_mapphone_wifi_init(void) { int ret; mapphone_wifi_pmena_gpio = get_gpio_by_name("wlan_pmena"); mapphone_wifi_irq_gpio = get_gpio_by_name("wlan_irqena"); ret = gpio_request(mapphone_wifi_pmena_gpio, "wifi_pmena"); if (ret < 0) goto out; gpio_direction_output(mapphone_wifi_pmena_gpio, 0); omap4_mapphone_wlan_data.irq = OMAP_GPIO_IRQ(mapphone_wifi_irq_gpio); if (wl12xx_set_platform_data(&omap4_mapphone_wlan_data)) pr_err("Error setting wl12xx data\n"); out: return; }
static void __init omap3_evm_wl12xx_init(void) { #ifdef CONFIG_WILINK_PLATFORM_DATA int ret; /* WL12xx WLAN Init */ omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO); ret = wl12xx_set_platform_data(&omap3evm_wlan_data); if (ret) pr_err("error setting wl12xx data: %d\n", ret); ret = platform_device_register(&omap3evm_wlan_regulator); if (ret) pr_err("error registering wl12xx device: %d\n", ret); #endif }
static void __init __used legacy_init_wl12xx(unsigned ref_clock, unsigned tcxo_clock, int gpio) { int res; wl12xx.board_ref_clock = ref_clock; wl12xx.board_tcxo_clock = tcxo_clock; wl12xx.irq = gpio_to_irq(gpio); res = wl12xx_set_platform_data(&wl12xx); if (res) { pr_err("error setting wl12xx data: %d\n", res); return; } }
static __init int da850_wl12xx_init(void) { int ret; ret = davinci_cfg_reg_list(da850_wl12xx_pins); if (ret) { pr_err("wl12xx/mmc mux setup failed: %d\n", ret); goto exit; } ret = da850_register_mmcsd1(&da850_wl12xx_mmc_config); if (ret) { pr_err("wl12xx/mmc registration failed: %d\n", ret); goto exit; } ret = gpio_request_one(DA850_WLAN_EN, GPIOF_OUT_INIT_LOW, "wl12xx_en"); if (ret) { pr_err("Could not request wl12xx enable gpio: %d\n", ret); goto exit; } ret = gpio_request_one(DA850_WLAN_IRQ, GPIOF_IN, "wl12xx_irq"); if (ret) { pr_err("Could not request wl12xx irq gpio: %d\n", ret); goto free_wlan_en; } da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ); ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data); if (ret) { pr_err("Could not set wl12xx data: %d\n", ret); goto free_wlan_irq; } return 0; free_wlan_irq: gpio_free(DA850_WLAN_IRQ); free_wlan_en: gpio_free(DA850_WLAN_EN); exit: return ret; }
void __init zoom_peripherals_init(void) { int ret; omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO); ret = wl12xx_set_platform_data(&omap_zoom_wlan_data); if (ret) pr_err("error setting wl12xx data: %d\n", ret); omap_hsmmc_init(mmc); omap_i2c_init(); platform_device_register(&omap_vwlan_device); usb_musb_init(NULL); enable_board_wakeup_source(); omap_serial_init(); }
static int __init k3v2_wifi_init(void) { int ret = 0; printk("TI WL18XX: %s \n", __func__); wifi_host = kzalloc(sizeof(struct wifi_host_s), GFP_KERNEL); wifi_host->clk = clk_get(NULL, "clk_pmu32kb"); //delete the regulator LDO14 that wifi not used wifi_host->block = iomux_get_block("block_wifi"); wifi_host->config = iomux_get_blockconfig("block_wifi"); blockmux_set(wifi_host->block, wifi_host->config, LOWPOWER); /* set power gpio */ ret = gpio_request(K3V2_WIFI_POWER_GPIO, NULL); if (ret < 0) { pr_err("%s: gpio_request failed, ret:%d.\n", __func__, K3V2_WIFI_POWER_GPIO); goto err_power_gpio_request; } gpio_direction_output(K3V2_WIFI_POWER_GPIO, 0); //z00186406 add to request out band irq, and convert gpio number to irq number begin ret = gpio_request(K3V2_WIFI_IRQ_GPIO, NULL); if(ret < 0) { pr_err( "%s: gpio_request failed, ret:%d.\n", __func__, K3V2_WIFI_IRQ_GPIO ); goto err_irq_gpio_request; } gpio_direction_input(K3V2_WIFI_IRQ_GPIO); k3v2_wlan_data.irq = gpio_to_irq(K3V2_WIFI_IRQ_GPIO); //z00186406 add to request out band irq, and convert gpio number to irq number end wl12xx_set_platform_data(&k3v2_wlan_data); return 0; //z00186406 add enable out band irq begin err_irq_gpio_request: gpio_free(K3V2_WIFI_IRQ_GPIO); //z00186406 add enable out band irq end err_power_gpio_request: gpio_free(K3V2_WIFI_POWER_GPIO); return ret; }
static void __init omap4_tablet_wifi_init(void) { int status = 0; omap4_tablet_wifi_mux_init(); status = gpio_request(GPIO_WIFI_PWEN, "wifi_pwen"); if (unlikely(status < 0)) { pr_err("Error requesting WIFI power-en gpio (%d)\n", GPIO_WIFI_PWEN); return; } /* Needed for mmc2 initialization */ gpio_direction_output(GPIO_WIFI_PWEN, 1); if (wl12xx_set_platform_data(&omap4_tablet_wlan_data)) pr_err("Error setting wl12xx data\n"); platform_device_register(&omap_vwlan_device); }
void __init zoom_peripherals_init(void) { int ret; omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO); ret = wl12xx_set_platform_data(&omap_zoom_wlan_data); if (ret) pr_err("error setting wl12xx data: %d\n", ret); omap_hsmmc_init(mmc); omap_i2c_init(); pwm_add_table(zoom_pwm_lookup, ARRAY_SIZE(zoom_pwm_lookup)); platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices)); usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); usb_musb_init(NULL); enable_board_wakeup_source(); omap_serial_init(); }
static void ti_wifi_init(void) { // Make sure your GPIO & PAD setting is match mxc_iomux_v3_setup_pad(MX50_PAD_KEY_ROW0__GPIO_4_1); gpio_request(WLAN_IRQ_IO, "wlan_irq"); gpio_direction_input(WLAN_IRQ_IO); mxc_iomux_v3_setup_pad(MX50_PAD_KEY_ROW1__GPIO_4_3); gpio_request(WLAN_EN_IO, "wlan_en"); #ifdef CONFIG_MACH_MX50_NIMBUS_TI_WIFI_PM_PATCH gpio_direction_output(WLAN_EN_IO , 0); #else gpio_direction_output(WLAN_EN_IO , 1); #endif if (wl12xx_set_platform_data(&ti_wlan_data)) { pr_err("Error setting wl12xx data\n"); } }
static void __init omap4_panda_init(void) { int package = OMAP_PACKAGE_CBS; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; omap4_mux_init(board_mux, NULL, package); if (wl12xx_set_platform_data(&omap_panda_wlan_data)) pr_err("error setting wl12xx data\n"); omap4_panda_i2c_init(); platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); platform_device_register(&omap_vwlan_device); board_serial_init(); omap4_twl6030_hsmmc_init(mmc); omap4_ehci_init(); usb_musb_init(&musb_board_data); omap4_panda_display_init(); }
static int __init delta_wifi_init(void) { int ret; ret = gpio_request(DELTA_WIFI_IRQ_GPIO, "wifi_irq"); if (ret < 0) { printk(KERN_ERR "%s: can't reserve GPIO: %d\n", __func__, DELTA_WIFI_IRQ_GPIO); goto out; } ret = gpio_request(DELTA_WIFI_PMENA_GPIO, "wifi_pmena"); if (ret < 0) { printk(KERN_ERR "%s: can't reserve GPIO: %d\n", __func__, DELTA_WIFI_PMENA_GPIO); gpio_free(DELTA_WIFI_IRQ_GPIO); goto out; } gpio_direction_input(DELTA_WIFI_IRQ_GPIO); gpio_direction_output(DELTA_WIFI_PMENA_GPIO, 0); if (wl12xx_set_platform_data(&delta_wlan_data)) pr_err("error setting wl12xx data\n"); out: return ret; }