aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorKim, Ben Young Tae <ytkim@qca.qualcomm.com>2015-02-15 18:06:14 -0500
committerMarcel Holtmann <marcel@holtmann.org>2015-03-02 20:07:00 -0500
commitace31982585a323afb194f56b9e0486f7bc6570c (patch)
treebc14f752f3159b6c6e1529be8bd39faba67d77d0 /drivers/bluetooth
parent49b31e576a0a264872aa06dbc1ce6cd0cb9db278 (diff)
Bluetooth: btusb: Add setup callback for chip init on USB
Some of chipset does not allow to send a patch or config files through HCI VS channel at early stage as well as they don't support to send USB patch files to other channel except USB bulk path. New callback added is for initialization of BT controller through USB Signed-off-by: Ben Young Tae Kim <ytkim@qca.qualcomm.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btusb.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 3ca2e1bf7bfa..73e1066cd38b 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -337,6 +337,8 @@ struct btusb_data {
337 337
338 int (*recv_event)(struct hci_dev *hdev, struct sk_buff *skb); 338 int (*recv_event)(struct hci_dev *hdev, struct sk_buff *skb);
339 int (*recv_bulk)(struct btusb_data *data, void *buffer, int count); 339 int (*recv_bulk)(struct btusb_data *data, void *buffer, int count);
340
341 int (*setup_on_usb)(struct hci_dev *hdev);
340}; 342};
341 343
342static inline void btusb_free_frags(struct btusb_data *data) 344static inline void btusb_free_frags(struct btusb_data *data)
@@ -878,6 +880,15 @@ static int btusb_open(struct hci_dev *hdev)
878 880
879 BT_DBG("%s", hdev->name); 881 BT_DBG("%s", hdev->name);
880 882
883 /* Patching USB firmware files prior to starting any URBs of HCI path
884 * It is more safe to use USB bulk channel for downloading USB patch
885 */
886 if (data->setup_on_usb) {
887 err = data->setup_on_usb(hdev);
888 if (err <0)
889 return err;
890 }
891
881 err = usb_autopm_get_interface(data->intf); 892 err = usb_autopm_get_interface(data->intf);
882 if (err < 0) 893 if (err < 0)
883 return err; 894 return err;