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,
90 void btintel_reset_to_bootloader(struct hci_dev *hdev);
93 static inline int btintel_check_bdaddr(struct hci_dev *hdev)
98 static inline int btintel_enter_mfg(struct hci_dev *hdev)
103 static inline int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched)
108 static inline int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
113 static inline int btintel_set_diag(struct hci_dev *hdev, bool enable)
118 static inline int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable)
123 static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
127 static inline void btintel_version_info(struct hci_dev *hdev,
128 struct intel_version *ver)
132 static inline int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type,
133 u32 plen, const void *param)
138 static inline int btintel_load_ddc_config(struct hci_dev *hdev,
139 const char *ddc_name)
144 static inline int btintel_set_event_mask(struct hci_dev *hdev, bool debug)
149 static inline int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug)
154 static inline int btintel_read_version(struct hci_dev *hdev,
155 struct intel_version *ver)
160 static inline struct regmap *btintel_regmap_init(struct hci_dev *hdev,
164 return ERR_PTR(-EINVAL);
167 static inline int btintel_send_intel_reset(struct hci_dev *hdev,
173 static inline int btintel_read_boot_params(struct hci_dev *hdev,
174 struct intel_boot_params *params)
179 static inline int btintel_download_firmware(struct hci_dev *dev,
180 const struct firmware *fw,
186 static inline void btintel_reset_to_bootloader(struct hci_dev *hdev)