summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btqca.h
diff options
context:
space:
mode:
authorBalakrishna Godavarthi <bgodavar@codeaurora.org>2018-08-03 08:16:28 -0400
committerMarcel Holtmann <marcel@holtmann.org>2018-08-03 08:44:06 -0400
commitaadebac4639d84ee51a12f2a1706fea1e4760b81 (patch)
treeab3d8140bce8bdd12c66bdf348ecc090e24ea880 /drivers/bluetooth/btqca.h
parentba493d4fbcb84bd14842c61cc077ffb5b3f7ecb1 (diff)
Bluetooth: btqca: Redefine qca_uart_setup() to generic function.
Redefinition of qca_uart_setup will help future Qualcomm Bluetooth SoC, to use the same function instead of duplicating the function. Added new arguments soc_type and soc_ver to the functions. These arguments will help to decide type of firmware files to be loaded into Bluetooth chip. soc_type holds the Bluetooth chip connected to APPS processor. soc_ver holds the Bluetooth chip version. Signed-off-by: Balakrishna Godavarthi <bgodavar@codeaurora.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btqca.h')
-rw-r--r--drivers/bluetooth/btqca.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h
index 5c9851b11838..a9c2779f3e07 100644
--- a/drivers/bluetooth/btqca.h
+++ b/drivers/bluetooth/btqca.h
@@ -124,10 +124,18 @@ struct tlv_type_hdr {
124 __u8 data[0]; 124 __u8 data[0];
125} __packed; 125} __packed;
126 126
127enum qca_btsoc_type {
128 QCA_INVALID = -1,
129 QCA_AR3002,
130 QCA_ROME,
131 QCA_WCN3990
132};
133
127#if IS_ENABLED(CONFIG_BT_QCA) 134#if IS_ENABLED(CONFIG_BT_QCA)
128 135
129int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr); 136int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr);
130int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate); 137int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
138 enum qca_btsoc_type soc_type, u32 soc_ver);
131int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version); 139int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version);
132 140
133#else 141#else
@@ -137,7 +145,8 @@ static inline int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdad
137 return -EOPNOTSUPP; 145 return -EOPNOTSUPP;
138} 146}
139 147
140static inline int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate) 148static inline int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
149 enum qca_btsoc_type soc_type, u32 soc_ver)
141{ 150{
142 return -EOPNOTSUPP; 151 return -EOPNOTSUPP;
143} 152}