3 * Bluetooth support for Intel devices
5 * Copyright (C) 2015 Intel Corporation
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 struct intel_version {
37 struct intel_boot_params {
66 struct intel_secure_send_result {
72 #if IS_ENABLED(CONFIG_BT_INTEL)
74 int btintel_check_bdaddr(struct hci_dev *hdev);
75 int btintel_enter_mfg(struct hci_dev *hdev);
76 int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched);
77 int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
78 int btintel_set_diag(struct hci_dev *hdev, bool enable);
79 int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable);
80 void btintel_hw_error(struct hci_dev *hdev, u8 code);
82 void btintel_version_info(struct hci_dev *hdev, struct intel_version *ver);
83 int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen,
85 int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name);
86 int btintel_set_event_mask(struct hci_dev *hdev, bool debug);
87 int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug);
88 int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver);
90 struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read,
95 static inline int btintel_check_bdaddr(struct hci_dev *hdev)
100 static inline int btintel_enter_mfg(struct hci_dev *hdev)
105 static inline int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched)
110 static inline int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
115 static inline int btintel_set_diag(struct hci_dev *hdev, bool enable)
120 static inline int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable)
125 static inline void btintel_hw_error(struct hci_dev *hdev, u8 code)
129 static inline void btintel_version_info(struct hci_dev *hdev,
130 struct intel_version *ver)
134 static inline int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type,
135 u32 plen, const void *param)
140 static inline int btintel_load_ddc_config(struct hci_dev *hdev,
141 const char *ddc_name)
146 static inline int btintel_set_event_mask(struct hci_dev *hdev, bool debug)
151 static inline int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug)
156 static inline int btintel_read_version(struct hci_dev *hdev,
157 struct intel_version *ver)
162 static inline struct regmap *btintel_regmap_init(struct hci_dev *hdev,
166 return ERR_PTR(-EINVAL);