summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btintel.h
diff options
context:
space:
mode:
authorTedd Ho-Jeong An <tedd.an@intel.com>2021-08-05 02:32:09 +0200
committerMarcel Holtmann <marcel@holtmann.org>2021-08-05 16:03:29 +0200
commitca5425e15881522fed47ddae60c22a487edef182 (patch)
tree79513909c76deabee232c7a263b89725945addac /drivers/bluetooth/btintel.h
parentBluetooth: Add support hdev to allocate private data (diff)
downloadlinux-ca5425e15881522fed47ddae60c22a487edef182.tar.xz
linux-ca5425e15881522fed47ddae60c22a487edef182.zip
Bluetooth: btintel: Add combined setup and shutdown functions
There are multiple setup and shutdown functions for Intel device and the setup function to be used is depends on the USB PID/VID, which makes difficult to maintain the code and increases the code size. This patch adds combined setup and shutdown functions to provide a single entry point for all Intel devices and choose the setup functions based on the information read with HCI_Intel_Read_Version command. Starting from TyP device, the command and response parameters for HCI_Intel_Read_Version command are changed even though OCF remains same. However, the legacy devices still can handle the command without error even if it has a extra parameter, so to simplify the flow, the new command format is used to read the version information for both legacy and new (tlv based) format. Also, it also adds a routine to setup the hdev callbacks in btintel. Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btintel.h')
-rw-r--r--drivers/bluetooth/btintel.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h
index d184064a5e7c..dda890d94a07 100644
--- a/drivers/bluetooth/btintel.h
+++ b/drivers/bluetooth/btintel.h
@@ -175,6 +175,7 @@ int btintel_read_debug_features(struct hci_dev *hdev,
struct intel_debug_features *features);
int btintel_set_debug_features(struct hci_dev *hdev,
const struct intel_debug_features *features);
+int btintel_configure_setup(struct hci_dev *hdev);
#else
static inline int btintel_check_bdaddr(struct hci_dev *hdev)
@@ -307,4 +308,9 @@ static inline int btintel_set_debug_features(struct hci_dev *hdev,
return -EOPNOTSUPP;
}
+static inline int btintel_configure_setup(struct hci_dev *hdev)
+{
+ return -ENODEV;
+}
+
#endif