return 0;
}
-void rk2928_tps_usb_wifi_on(void)
-{
- struct regulator *ldo;
- ldo = regulator_get(NULL, "vmmc"); //vccio_wl
- regulator_enable(ldo);
- printk("%s: vccio_wl enable\n", __func__);
- regulator_put(ldo);
- udelay(100);
-}
-EXPORT_SYMBOL(rk2928_tps_usb_wifi_on);
-void rk2928_tps_usb_wifi_off(void)
-{
- struct regulator *ldo;
- ldo = regulator_get(NULL, "vmmc"); //vccio_wl
- printk("%s: vccio_wl disable\n", __func__);
- regulator_disable(ldo);
- regulator_put(ldo);
- udelay(100);
-}
-EXPORT_SYMBOL(rk2928_tps_usb_wifi_off);
-
int tps65910_post_init(struct tps65910 *tps65910)
{
static int rk_fb_io_disable(void)
{
- #if defined(CONFIG_REGULATOR_ACT8931)
+ #if 0//defined(CONFIG_REGULATOR_ACT8931)
if(g_pmic_type == PMIC_TYPE_ACT8931)
{
struct regulator *ldo;
}
static int rk_fb_io_enable(void)
{
- #if defined(CONFIG_REGULATOR_ACT8931)
+ #if 0//defined(CONFIG_REGULATOR_ACT8931)
if(g_pmic_type == PMIC_TYPE_ACT8931)
{
struct regulator *ldo;
},
};
#endif
+
+/***********************************************************
+* usb wifi
+************************************************************/
+#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU)
+
+static void rkusb_wifi_power(int on) {
+ struct regulator *ldo;
+
+#if defined(CONFIG_MFD_TPS65910)
+ if(g_pmic_type == PMIC_TYPE_TPS65910) {
+ ldo = regulator_get(NULL, "vmmc"); //vccio_wl
+ }
+#endif
+#if defined(CONFIG_REGULATOR_ACT8931)
+ if(g_pmic_type == PMIC_TYPE_ACT8931) {
+ ldo = regulator_get(NULL, "act_ldo4"); //vccio_wl
+ }
+#endif
+
+ if(on) {
+ regulator_enable(ldo);
+ printk("%s: vccio_wl enable\n", __func__);
+ } else {
+ printk("%s: vccio_wl disable\n", __func__);
+ regulator_disable(ldo);
+ }
+
+ regulator_put(ldo);
+ udelay(100);
+}
+
+#endif
+
/**************************************************************************************************
* SDMMC devices, include the module of SD,MMC,and sdio.noted by xbw at 2012-03-05
**************************************************************************************************/
return 0;
}
-void rk2928_act_usb_wifi_on(void)
-{
- struct regulator *ldo;
- ldo = regulator_get(NULL, "act_ldo4"); //vccio_wl
- regulator_enable(ldo);
- printk("%s: vccio_wl enable\n", __func__);
- regulator_put(ldo);
- udelay(100);
-}
-EXPORT_SYMBOL(rk2928_act_usb_wifi_on);
-void rk2928_act_usb_wifi_off(void)
-{
- struct regulator *ldo;
- ldo = regulator_get(NULL, "act_ldo4"); //vccio_wl
- printk("%s: vccio_wl disable\n", __func__);
- regulator_disable(ldo);
- regulator_put(ldo);
- udelay(100);
-}
-EXPORT_SYMBOL(rk2928_act_usb_wifi_off);
-
static struct regulator_consumer_supply act8931_buck1_supply[] = {
{
.supply = "act_dcdc1",
}
#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU)
-void rk2928_act_usb_wifi_on(void);
-void rk2928_act_usb_wifi_off(void);
-void rk2928_tps_usb_wifi_on(void);
-void rk2928_tps_usb_wifi_off(void);
-
static int usbwifi_power_status = 1;
-static void rk2928_usb_wifi_power(int on) {
-#if defined(CONFIG_MFD_TPS65910)
- if(g_pmic_type == PMIC_TYPE_TPS65910) {
- if(on)
- rk2928_tps_usb_wifi_on();
- else
- rk2928_tps_usb_wifi_off();
- }
-#endif
-#if defined(CONFIG_REGULATOR_ACT8931)
- if(g_pmic_type == PMIC_TYPE_ACT8931) {
- if(on)
- rk2928_act_usb_wifi_on();
- else
- rk2928_act_usb_wifi_off();
- }
-#endif
-}
-
- int rk29sdk_wifi_power(int on)
- {
+int rk29sdk_wifi_power(int on)
+{
pr_info("%s: %d\n", __func__, on);
if (on){
/*if(usbwifi_power_status == 1) {
- rk2928_usb_wifi_power(0);
+ rkusb_wifi_power(0);
mdelay(50);
}*/
- rk2928_usb_wifi_power(1);
+ rkusb_wifi_power(1);
usbwifi_power_status = 1;
pr_info("wifi turn on power\n");
}else{
- rk2928_usb_wifi_power(0);
+ rkusb_wifi_power(0);
usbwifi_power_status = 0;
pr_info("wifi shut off power\n");
}
return 0;
- }
+}
#else
int rk29sdk_wifi_power(int on)
{