diff options
author | Tedd Ho-Jeong An <tedd.an@linux.intel.com> | 2018-01-24 20:19:18 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2018-01-24 21:31:49 +0300 |
commit | e5889af62fce081dbd2e5d087683b9b7135bc731 (patch) | |
tree | 0391b8591efb6ff15872fb237964936ebb8e9de2 /drivers/bluetooth/btintel.c | |
parent | 965651c16b9e6212f781d5b619ab78bd82bf54ce (diff) | |
download | linux-e5889af62fce081dbd2e5d087683b9b7135bc731.tar.xz |
Bluetooth: btintel: Create common function for Intel Reset
The Intel_Reset command is used to reset the device after downloading
the firmware and this is Intel generic command used in both USB and
UART.
Signed-off-by: Tedd Ho-Jeong An <tedd.an@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btintel.c')
-rw-r--r-- | drivers/bluetooth/btintel.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 07f00e422e85..c8aaed16f858 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -569,6 +569,26 @@ struct regmap *btintel_regmap_init(struct hci_dev *hdev, u16 opcode_read, } EXPORT_SYMBOL_GPL(btintel_regmap_init); +int btintel_send_intel_reset(struct hci_dev *hdev, u32 boot_param) +{ + struct intel_reset params = { 0x00, 0x01, 0x00, 0x01, 0x00000000 }; + struct sk_buff *skb; + + params.boot_param = cpu_to_le32(boot_param); + + skb = __hci_cmd_sync(hdev, 0xfc01, sizeof(params), ¶ms, + HCI_INIT_TIMEOUT); + if (IS_ERR(skb)) { + bt_dev_err(hdev, "Failed to send Intel Reset command"); + return PTR_ERR(skb); + } + + kfree_skb(skb); + + return 0; +} +EXPORT_SYMBOL_GPL(btintel_send_intel_reset); + MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); MODULE_DESCRIPTION("Bluetooth support for Intel devices ver " VERSION); MODULE_VERSION(VERSION); |