sync bes2600/ to v7.0-danctnix1 baseline (rebasing reference)
This commit is contained in:
+46
-3
@@ -196,7 +196,7 @@ static int bes2600_switch_wifi(bool on)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int bes2600_switch_bt(bool on)
|
||||
static int bes2600_switch_bt(bool on)
|
||||
{
|
||||
int ret = 0;
|
||||
long status = 0;
|
||||
@@ -229,11 +229,11 @@ int bes2600_switch_bt(bool on)
|
||||
/* check if there is a error when bootup */
|
||||
ret = (status <= 0 || bes2600_chrdev_is_bus_error()) ? -1 : 0;
|
||||
} else {
|
||||
bes_info("enable BT\n");
|
||||
bes_devel("bes2600 activate bt.\n");
|
||||
ret = bes2600_chrdev_switch_subsys(GPIO_WAKE_FLAG_BT_ON, SUBSYSTEM_BT, true);
|
||||
}
|
||||
} else {
|
||||
bes_info("disable BT\n");
|
||||
bes_devel("bes2600 deactivate bt.\n");
|
||||
bes2600_chrdev_switch_subsys(GPIO_WAKE_FLAG_BT_OFF, SUBSYSTEM_BT, false);
|
||||
}
|
||||
|
||||
@@ -249,6 +249,47 @@ int bes2600_switch_bt(bool on)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a global function so we don't have to make many changes to
|
||||
* the driver.
|
||||
*
|
||||
* @wifi: 1 to turn on, 0 to turn off. Otherwise, leave unchanged
|
||||
* @bt: 1 to turn on, 0 to turn off. Otherwise, leave unchanged
|
||||
*/
|
||||
int bes2600_chrdev_switch_subsys_glb(int wifi, int bt)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
switch (wifi) {
|
||||
case 0:
|
||||
ret = bes2600_switch_wifi(false);
|
||||
break;
|
||||
case 1:
|
||||
ret = bes2600_switch_wifi(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
goto result;
|
||||
|
||||
switch (bt) {
|
||||
case 0:
|
||||
ret = bes2600_switch_bt(false);
|
||||
break;
|
||||
case 1:
|
||||
ret = bes2600_switch_bt(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
result:
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bes2600_chrdev_switch_subsys_glb);
|
||||
|
||||
static int bes2600_get_cmd_and_ifname(const char *str, char **result)
|
||||
{
|
||||
int cmd_len = 0;
|
||||
@@ -1085,6 +1126,7 @@ void bes2600_chrdev_wakeup_bt(void)
|
||||
bes_err("Wakeup BT fail in resume\n");
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bes2600_chrdev_wakeup_bt);
|
||||
|
||||
int bes2600_chrdev_get_fw_type(void)
|
||||
{
|
||||
@@ -1106,6 +1148,7 @@ bool bes2600_chrdev_is_bus_error(void)
|
||||
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bes2600_chrdev_is_bus_error);
|
||||
|
||||
void bes2600_chrdev_update_signal_mode(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user