BT: resolve bt remote re-connected fail [1/1]
authorqiu.zeng <qiu.zeng@amlogic.com>
Fri, 7 Dec 2018 02:49:08 +0000 (10:49 +0800)
committerLuan Yuan <luan.yuan@amlogic.com>
Mon, 17 Dec 2018 06:54:59 +0000 (14:54 +0800)
PD#SWPL-2735

Problem:
bt remote re-connected fail

Solution:
control bluetooth opwer up

Verify:
Verifying on Public Edition r311

Change-Id: I8c74442894f606d5afd992e52d6c80bada0aed9f
Signed-off-by: Qiu Zeng <qiu.zeng@amlogic.com>
drivers/amlogic/bluetooth/bt_device.c

index 594a14b..c926f13 100644 (file)
@@ -281,8 +281,13 @@ static int bt_probe(struct platform_device *pdev)
 #else
        pdata = (struct bt_dev_data *)(pdev->dev.platform_data);
 #endif
-
        bt_device_init(pdata);
+       if (pdata->power_down_disable == 1) {
+               pdata->power_down_disable = 0;
+               bt_device_on(pdata);
+               pdata->power_down_disable = 1;
+       }
+
        /* default to bluetooth off */
        /* rfkill_switch_all(RFKILL_TYPE_BLUETOOTH, 1); */
        /* bt_device_off(pdata); */