1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * Bluetooth support for Intel devices
6 * Copyright (C) 2015 Intel Corporation
22 struct intel_boot_params {
51 struct intel_secure_send_result {
65 #if IS_ENABLED(CONFIG_BT_INTEL)
67 int btintel_check_bdaddr(struct hci_dev *hdev);
68 int btintel_enter_mfg(struct hci_dev *hdev);
69 int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched);
70 int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
71 int btintel_set_diag(struct hci_dev *hdev, bool enable);
72 int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable);
73 void btintel_hw_error(struct hci_dev *hdev, u8 code);
75 void btintel_version_info(struct hci_dev *hdev, struct intel_version *ver);
76 int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen,
78 int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name);
79 int btintel_set_event_mask(struct hci_dev *hdev, bool debug);
80 int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug);
81 int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver);
83 struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read,
85 int btintel_send_intel_reset(struct hci_dev *hdev, u32 boot_param);
86 int btintel_read_boot_params(struct hci_dev *hdev,
87 struct intel_boot_params *params);
88 int btintel_download_firmware(struct hci_dev *dev, const struct firmware *fw,
92 static inline int btintel_check_bdaddr(struct hci_dev *hdev)
97 static inline int btintel_enter_mfg(struct hci_dev *hdev)
102 static inline int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched)
107 static inline int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
112 static inline int btintel_set_diag(struct hci_dev *hdev, bool enable)
117 static inline int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable)
122 static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
126 static inline void btintel_version_info(struct hci_dev *hdev,
127 struct intel_version *ver)
131 static inline int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type,
132 u32 plen, const void *param)
137 static inline int btintel_load_ddc_config(struct hci_dev *hdev,
138 const char *ddc_name)
143 static inline int btintel_set_event_mask(struct hci_dev *hdev, bool debug)
148 static inline int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug)
153 static inline int btintel_read_version(struct hci_dev *hdev,
154 struct intel_version *ver)
159 static inline struct regmap *btintel_regmap_init(struct hci_dev *hdev,
163 return ERR_PTR(-EINVAL);
166 static inline int btintel_send_intel_reset(struct hci_dev *hdev,
172 static inline int btintel_read_boot_params(struct hci_dev *hdev,
173 struct intel_boot_params *params)
178 static inline int btintel_download_firmware(struct hci_dev *dev,
179 const struct firmware *fw,