Linux 4.1.16
[linux/fpc-iii.git] / drivers / bluetooth / btintel.h
blob4bda6ab34f60292da156b79314fcac9284aa4193
1 /*
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 {
25 u8 status;
26 u8 hw_platform;
27 u8 hw_variant;
28 u8 hw_revision;
29 u8 fw_variant;
30 u8 fw_revision;
31 u8 fw_build_num;
32 u8 fw_build_ww;
33 u8 fw_build_yy;
34 u8 fw_patch_num;
35 } __packed;
37 struct intel_boot_params {
38 __u8 status;
39 __u8 otp_format;
40 __u8 otp_content;
41 __u8 otp_patch;
42 __le16 dev_revid;
43 __u8 secure_boot;
44 __u8 key_from_hdr;
45 __u8 key_type;
46 __u8 otp_lock;
47 __u8 api_lock;
48 __u8 debug_lock;
49 bdaddr_t otp_bdaddr;
50 __u8 min_fw_build_nn;
51 __u8 min_fw_build_cw;
52 __u8 min_fw_build_yy;
53 __u8 limited_cce;
54 __u8 unlocked_state;
55 } __packed;
57 struct intel_bootup {
58 __u8 zero;
59 __u8 num_cmds;
60 __u8 source;
61 __u8 reset_type;
62 __u8 reset_reason;
63 __u8 ddc_status;
64 } __packed;
66 struct intel_secure_send_result {
67 __u8 result;
68 __le16 opcode;
69 __u8 status;
70 } __packed;
72 #if IS_ENABLED(CONFIG_BT_INTEL)
74 int btintel_check_bdaddr(struct hci_dev *hdev);
75 int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
77 #else
79 static inline int btintel_check_bdaddr(struct hci_dev *hdev)
81 return -EOPNOTSUPP;
84 static inline int btintel_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
86 return -EOPNOTSUPP;
89 #endif