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 struct intel_debug_features
{
69 #if IS_ENABLED(CONFIG_BT_INTEL)
71 int btintel_check_bdaddr(struct hci_dev
*hdev
);
72 int btintel_enter_mfg(struct hci_dev
*hdev
);
73 int btintel_exit_mfg(struct hci_dev
*hdev
, bool reset
, bool patched
);
74 int btintel_set_bdaddr(struct hci_dev
*hdev
, const bdaddr_t
*bdaddr
);
75 int btintel_set_diag(struct hci_dev
*hdev
, bool enable
);
76 int btintel_set_diag_mfg(struct hci_dev
*hdev
, bool enable
);
77 void btintel_hw_error(struct hci_dev
*hdev
, u8 code
);
79 void btintel_version_info(struct hci_dev
*hdev
, struct intel_version
*ver
);
80 int btintel_secure_send(struct hci_dev
*hdev
, u8 fragment_type
, u32 plen
,
82 int btintel_load_ddc_config(struct hci_dev
*hdev
, const char *ddc_name
);
83 int btintel_set_event_mask(struct hci_dev
*hdev
, bool debug
);
84 int btintel_set_event_mask_mfg(struct hci_dev
*hdev
, bool debug
);
85 int btintel_read_version(struct hci_dev
*hdev
, struct intel_version
*ver
);
87 struct regmap
*btintel_regmap_init(struct hci_dev
*hdev
, u16 opcode_read
,
89 int btintel_send_intel_reset(struct hci_dev
*hdev
, u32 boot_param
);
90 int btintel_read_boot_params(struct hci_dev
*hdev
,
91 struct intel_boot_params
*params
);
92 int btintel_download_firmware(struct hci_dev
*dev
, const struct firmware
*fw
,
94 void btintel_reset_to_bootloader(struct hci_dev
*hdev
);
95 int btintel_read_debug_features(struct hci_dev
*hdev
,
96 struct intel_debug_features
*features
);
97 int btintel_set_debug_features(struct hci_dev
*hdev
,
98 const struct intel_debug_features
*features
);
101 static inline int btintel_check_bdaddr(struct hci_dev
*hdev
)
106 static inline int btintel_enter_mfg(struct hci_dev
*hdev
)
111 static inline int btintel_exit_mfg(struct hci_dev
*hdev
, bool reset
, bool patched
)
116 static inline int btintel_set_bdaddr(struct hci_dev
*hdev
, const bdaddr_t
*bdaddr
)
121 static inline int btintel_set_diag(struct hci_dev
*hdev
, bool enable
)
126 static inline int btintel_set_diag_mfg(struct hci_dev
*hdev
, bool enable
)
131 static inline void btintel_hw_error(struct hci_dev
*hdev
, u8 code
)
135 static inline void btintel_version_info(struct hci_dev
*hdev
,
136 struct intel_version
*ver
)
140 static inline int btintel_secure_send(struct hci_dev
*hdev
, u8 fragment_type
,
141 u32 plen
, const void *param
)
146 static inline int btintel_load_ddc_config(struct hci_dev
*hdev
,
147 const char *ddc_name
)
152 static inline int btintel_set_event_mask(struct hci_dev
*hdev
, bool debug
)
157 static inline int btintel_set_event_mask_mfg(struct hci_dev
*hdev
, bool debug
)
162 static inline int btintel_read_version(struct hci_dev
*hdev
,
163 struct intel_version
*ver
)
168 static inline struct regmap
*btintel_regmap_init(struct hci_dev
*hdev
,
172 return ERR_PTR(-EINVAL
);
175 static inline int btintel_send_intel_reset(struct hci_dev
*hdev
,
181 static inline int btintel_read_boot_params(struct hci_dev
*hdev
,
182 struct intel_boot_params
*params
)
187 static inline int btintel_download_firmware(struct hci_dev
*dev
,
188 const struct firmware
*fw
,
194 static inline void btintel_reset_to_bootloader(struct hci_dev
*hdev
)
198 static inline int btintel_read_debug_features(struct hci_dev
*hdev
,
199 struct intel_debug_features
*features
)
204 static inline int btintel_set_debug_features(struct hci_dev
*hdev
,
205 const struct intel_debug_features
*features
)