Blame view
drivers/bluetooth/btintel.h
4.12 KB
48f0ed1bb
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
/* * * Bluetooth support for Intel devices * * Copyright (C) 2015 Intel Corporation * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ |
59a077c47
|
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
struct intel_version { u8 status; u8 hw_platform; u8 hw_variant; u8 hw_revision; u8 fw_variant; u8 fw_revision; u8 fw_build_num; u8 fw_build_ww; u8 fw_build_yy; u8 fw_patch_num; } __packed; struct intel_boot_params { __u8 status; __u8 otp_format; __u8 otp_content; __u8 otp_patch; __le16 dev_revid; __u8 secure_boot; __u8 key_from_hdr; __u8 key_type; __u8 otp_lock; __u8 api_lock; __u8 debug_lock; bdaddr_t otp_bdaddr; __u8 min_fw_build_nn; __u8 min_fw_build_cw; __u8 min_fw_build_yy; __u8 limited_cce; __u8 unlocked_state; } __packed; |
ccd6da2ab
|
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
struct intel_bootup { __u8 zero; __u8 num_cmds; __u8 source; __u8 reset_type; __u8 reset_reason; __u8 ddc_status; } __packed; struct intel_secure_send_result { __u8 result; __le16 opcode; __u8 status; } __packed; |
48f0ed1bb
|
69 70 71 |
#if IS_ENABLED(CONFIG_BT_INTEL) int btintel_check_bdaddr(struct hci_dev *hdev); |
28dc4b92e
|
72 73 |
int btintel_enter_mfg(struct hci_dev *hdev); int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched); |
48f0ed1bb
|
74 |
int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr); |
6d2e50d24
|
75 |
int btintel_set_diag(struct hci_dev *hdev, bool enable); |
3e24767b7
|
76 |
int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable); |
973bb97e5
|
77 |
void btintel_hw_error(struct hci_dev *hdev, u8 code); |
48f0ed1bb
|
78 |
|
7feb99e13
|
79 |
void btintel_version_info(struct hci_dev *hdev, struct intel_version *ver); |
09df123d2
|
80 81 |
int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen, const void *param); |
145f2368c
|
82 |
int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name); |
213445b2b
|
83 84 |
int btintel_set_event_mask(struct hci_dev *hdev, bool debug); int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug); |
6c483de1b
|
85 |
int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver); |
09df123d2
|
86 |
|
d06f107bc
|
87 88 |
struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read, u16 opcode_write); |
48f0ed1bb
|
89 90 91 92 93 94 |
#else static inline int btintel_check_bdaddr(struct hci_dev *hdev) { return -EOPNOTSUPP; } |
28dc4b92e
|
95 96 97 98 99 100 101 102 103 |
static inline int btintel_enter_mfg(struct hci_dev *hdev) { return -EOPNOTSUPP; } static inline int btintel_exit_mfg(struct hci_dev *hdev, bool reset, bool patched) { return -EOPNOTSUPP; } |
48f0ed1bb
|
104 105 106 107 |
static inline int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr) { return -EOPNOTSUPP; } |
6d2e50d24
|
108 109 110 111 |
static inline int btintel_set_diag(struct hci_dev *hdev, bool enable) { return -EOPNOTSUPP; } |
3e24767b7
|
112 113 114 115 |
static inline int btintel_set_diag_mfg(struct hci_dev *hdev, bool enable) { return -EOPNOTSUPP; } |
973bb97e5
|
116 117 118 |
static inline void btintel_hw_error(struct hci_dev *hdev, u8 code) { } |
0eee53cdd
|
119 120 |
static inline void btintel_version_info(struct hci_dev *hdev, struct intel_version *ver) |
7feb99e13
|
121 122 |
{ } |
09df123d2
|
123 124 125 126 127 |
static inline int btintel_secure_send(struct hci_dev *hdev, u8 fragment_type, u32 plen, const void *param) { return -EOPNOTSUPP; } |
145f2368c
|
128 129 130 131 132 |
static inline int btintel_load_ddc_config(struct hci_dev *hdev, const char *ddc_name) { return -EOPNOTSUPP; } |
213445b2b
|
133 134 135 136 137 138 139 140 141 |
static inline int btintel_set_event_mask(struct hci_dev *hdev, bool debug) { return -EOPNOTSUPP; } static inline int btintel_set_event_mask_mfg(struct hci_dev *hdev, bool debug) { return -EOPNOTSUPP; } |
6c483de1b
|
142 143 144 145 146 |
static inline int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver) { return -EOPNOTSUPP; } |
d06f107bc
|
147 148 149 150 151 152 |
static inline struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read, u16 opcode_write) { return ERR_PTR(-EINVAL); } |
48f0ed1bb
|
153 |
#endif |