BT: Reduce bt power up-down times, and fix bt start timeout crash [1/1]

PD#SWPL-200328

Problem:
bt crash during the first power-on

Solution:
Reduce repeated bt power-on time.bt start need Less than 3s

Verify:
adt4

Change-Id: Ie437e6b6d01f177654a3967615f302d649556e4a
Signed-off-by: hong.wang <hong.wang@amlogic.com>
This commit is contained in:
hong.wang
2025-02-28 15:03:41 +08:00
committed by gerrit autosubmit
parent eeeed6855c
commit 428ea91d75
2 changed files with 7 additions and 9 deletions
+3 -9
View File
@@ -123,7 +123,7 @@ struct bt_dev_runtime_data {
static void off_def_power(struct bt_dev_data *pdata, unsigned long down_time)
{
pr_debug("[%s]: pid: %d comm: %s\n", __func__,
pr_info("[%s]: pid: %d comm: %s\n", __func__,
current->pid, current->comm);
if (pdata->gpio_reset > 0) {
@@ -134,9 +134,6 @@ static void off_def_power(struct bt_dev_data *pdata, unsigned long down_time)
gpio_direction_output(pdata->gpio_reset,
pdata->power_low_level);
}
if (down_time)
msleep(down_time);
}
#ifndef CONTROL_POWER_EN_LINUX
@@ -151,7 +148,7 @@ static void off_def_power(struct bt_dev_data *pdata, unsigned long down_time)
static void on_def_power(struct bt_dev_data *pdata, unsigned long up_time)
{
pr_debug("[%s]: pid: %d comm: %s\n", __func__,
pr_info("[%s]: pid: %d comm: %s\n", __func__,
current->pid, current->comm);
if (pdata->gpio_reset > 0) {
@@ -162,10 +159,7 @@ static void on_def_power(struct bt_dev_data *pdata, unsigned long up_time)
gpio_direction_output(pdata->gpio_reset,
!pdata->power_low_level);
}
if (up_time)
msleep(up_time);
}
}
#ifndef CONTROL_POWER_EN_LINUX
if (pdata->gpio_en && pdata->power_on_pin_OD &&
+4
View File
@@ -272,6 +272,8 @@ static void usb_power_control(int is_power, int shift)
(shift ? "WiFi" : "BT"));
msleep(200);
sdio_reinit();
} else if (shift == BT_BIT) {
msleep(200);
}
usb_power |= (1 << shift);
WIFI_INFO("Set %s power on !\n",
@@ -283,6 +285,8 @@ static void usb_power_control(int is_power, int shift)
msleep(200);
WIFI_INFO("Set %s power down\n",
(shift ? "WiFi" : "BT"));
} else if (shift == BT_BIT) {
msleep(200);
}
}
mutex_unlock(&wifi_bt_mutex);