diff options
author | Aisheng.Dong <b29396@freescale.com> | 2011-01-17 17:21:12 +0800 |
---|---|---|
committer | Aisheng.Dong <b29396@freescale.com> | 2011-01-17 21:10:18 +0800 |
commit | 6319945be2e578cb55374f0881f865bad547f62a (patch) | |
tree | df3d4796b8c08a9e404c6d51ece24facffaff72d | |
parent | 7e496527b906d544620d002a91a2176631a2ea33 (diff) |
ENGR00138050 mx53 smd: enable WiFi power during system boot up
1) Enable WiFi power during system boot up or WiFi card can not
be detected.
2) Remove BT Power on/off control in RFKILL function because bt/wifi
are sharing one regulator and has conflicts on power control.
Signed-off-by: Aisheng.Dong <b29396@freescale.com>
-rw-r--r-- | arch/arm/mach-mx5/mx53_smd.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/arch/arm/mach-mx5/mx53_smd.c b/arch/arm/mach-mx5/mx53_smd.c index a9f0c4e1f8d7..d0dfa1577b67 100644 --- a/arch/arm/mach-mx5/mx53_smd.c +++ b/arch/arm/mach-mx5/mx53_smd.c @@ -932,19 +932,8 @@ static void mx53_smd_bt_reset(void) static int mx53_smd_bt_power_change(int status) { - struct regulator *wifi_bt_pwren; - - wifi_bt_pwren = regulator_get(NULL, "wifi_bt"); - if (IS_ERR(wifi_bt_pwren)) { - printk(KERN_ERR "%s: regulator_get error\n", __func__); - return -1; - } - - if (status) { - regulator_enable(wifi_bt_pwren); + if (status) mx53_smd_bt_reset(); - } else - regulator_disable(wifi_bt_pwren); return 0; } @@ -1101,6 +1090,19 @@ static void __init mx53_smd_io_init(void) gpio_direction_output(MX53_SMD_CSI0_PWN, 1); msleep(1); gpio_set_value(MX53_SMD_CSI0_PWN, 0); + + /* Enable WiFi/BT Power*/ + gpio_request(MX53_SMD_WiFi_BT_PWR_EN, "bt-wifi-pwren"); + gpio_direction_output(MX53_SMD_WiFi_BT_PWR_EN, 1); + + /* WiFi Power up sequence */ + gpio_request(MX53_SMD_WLAN_PD, "wifi-pd"); + gpio_direction_output(MX53_SMD_WLAN_PD, 1); + mdelay(1); + gpio_set_value(MX53_SMD_WLAN_PD, 0); + mdelay(5); + gpio_set_value(MX53_SMD_WLAN_PD, 1); + gpio_free(MX53_SMD_WLAN_PD); } /*! |