summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/btbcm.h
diff options
context:
space:
mode:
authorFrederic Danis <frederic.danis@linux.intel.com>2015-05-28 09:25:04 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2015-06-06 05:33:25 (GMT)
commit75e167e6f0ddcf65567c0a604e4827f0a914a4c1 (patch)
treeebae5dfc21095ce5a39d1ed63236e340ed7db63f /drivers/bluetooth/btbcm.h
parent7721383f4199bb704c664f009423bc228bbac52e (diff)
downloadlinux-75e167e6f0ddcf65567c0a604e4827f0a914a4c1.tar.xz
Bluetooth: btbcm: Add helper functions for UART setup
Firmware loading may reset the controller UART speed and needs to set host UART speed back to init speed. UART drivers setup is split in 3 parts: - btbcm_initialize() resets the controller and returns the firmware name based on controller revision and sub_version. - btbtcm_patchram() (already existing and public), which takes the firmware name as parameter, requests the firmware and loads it to the controller. - btbcm_finalize() which resets the controller, reads local version and checks if the controller address is a default one or not. Remove firmware name retrieval for UART controllers from btbcm_setup_patchram(). Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btbcm.h')
-rw-r--r--drivers/bluetooth/btbcm.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/bluetooth/btbcm.h b/drivers/bluetooth/btbcm.h
index 42f26a6..f405f84 100644
--- a/drivers/bluetooth/btbcm.h
+++ b/drivers/bluetooth/btbcm.h
@@ -30,6 +30,9 @@ int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw);
int btbcm_setup_patchram(struct hci_dev *hdev);
int btbcm_setup_apple(struct hci_dev *hdev);
+int btbcm_initialize(struct hci_dev *hdev, char *fw_name, size_t len);
+int btbcm_finalize(struct hci_dev *hdev);
+
#else
static inline int btbcm_check_bdaddr(struct hci_dev *hdev)
@@ -57,4 +60,15 @@ static inline int btbcm_setup_apple(struct hci_dev *hdev)
return 0;
}
+static inline int btbcm_initialize(struct hci_dev *hdev, char *fw_name,
+ size_t len)
+{
+ return 0;
+}
+
+static inline int btbcm_finalize(struct hci_dev *hdev)
+{
+ return 0;
+}
+
#endif