OSDN Git Service

Bluetooth: btusb: Edit the logical value for Realtek Bluetooth reset
authorMax Chou <max.chou@realtek.com>
Wed, 27 Nov 2019 03:01:07 +0000 (11:01 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 27 Nov 2019 05:40:09 +0000 (06:40 +0100)
It should be pull low and pull high on the physical line for the Realtek
Bluetooth reset. gpiod_set_value_cansleep() takes ACTIVE_LOW status for
the logical value settings, so the original commit should be corrected.

Signed-off-by: Max Chou <max.chou@realtek.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btusb.c

index 70e3859..82fb2e7 100644 (file)
@@ -552,9 +552,9 @@ static void btusb_rtl_cmd_timeout(struct hci_dev *hdev)
        }
 
        bt_dev_err(hdev, "Reset Realtek device via gpio");
-       gpiod_set_value_cansleep(reset_gpio, 0);
-       msleep(200);
        gpiod_set_value_cansleep(reset_gpio, 1);
+       msleep(200);
+       gpiod_set_value_cansleep(reset_gpio, 0);
 }
 
 static inline void btusb_free_frags(struct btusb_data *data)