nVMX x86: Check VPID value on vmentry of L2 guests
[linux/fpc-iii.git] / drivers / bluetooth / btbcm.h
blob5346515c880c6582131a770e74af9f2de49825b2
1 /*
3 * Bluetooth support for Broadcom 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 #define BCM_UART_CLOCK_48MHZ 0x01
25 #define BCM_UART_CLOCK_24MHZ 0x02
27 struct bcm_update_uart_baud_rate {
28 __le16 zero;
29 __le32 baud_rate;
30 } __packed;
32 struct bcm_write_uart_clock_setting {
33 __u8 type;
34 } __packed;
36 struct bcm_set_sleep_mode {
37 __u8 sleep_mode;
38 __u8 idle_host;
39 __u8 idle_dev;
40 __u8 bt_wake_active;
41 __u8 host_wake_active;
42 __u8 allow_host_sleep;
43 __u8 combine_modes;
44 __u8 tristate_control;
45 __u8 usb_auto_sleep;
46 __u8 usb_resume_timeout;
47 __u8 break_to_host;
48 __u8 pulsed_host_wake;
49 } __packed;
51 struct bcm_set_pcm_int_params {
52 __u8 routing;
53 __u8 rate;
54 __u8 frame_sync;
55 __u8 sync_mode;
56 __u8 clock_mode;
57 } __packed;
59 struct bcm_set_pcm_format_params {
60 __u8 lsb_first;
61 __u8 fill_value;
62 __u8 fill_method;
63 __u8 fill_num;
64 __u8 right_justify;
65 } __packed;
67 #if IS_ENABLED(CONFIG_BT_BCM)
69 int btbcm_check_bdaddr(struct hci_dev *hdev);
70 int btbcm_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr);
71 int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw);
73 int btbcm_setup_patchram(struct hci_dev *hdev);
74 int btbcm_setup_apple(struct hci_dev *hdev);
76 int btbcm_initialize(struct hci_dev *hdev, char *fw_name, size_t len,
77 bool reinit);
78 int btbcm_finalize(struct hci_dev *hdev);
80 #else
82 static inline int btbcm_check_bdaddr(struct hci_dev *hdev)
84 return -EOPNOTSUPP;
87 static inline int btbcm_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
89 return -EOPNOTSUPP;
92 static inline int btbcm_patchram(struct hci_dev *hdev, const struct firmware *fw)
94 return -EOPNOTSUPP;
97 static inline int btbcm_setup_patchram(struct hci_dev *hdev)
99 return 0;
102 static inline int btbcm_setup_apple(struct hci_dev *hdev)
104 return 0;
107 static inline int btbcm_initialize(struct hci_dev *hdev, char *fw_name,
108 size_t len, bool reinit)
110 return 0;
113 static inline int btbcm_finalize(struct hci_dev *hdev)
115 return 0;
118 #endif