Return-Path: From: Raghuram Hegde To: linux-bluetooth@vger.kernel.org Cc: raghuram.hegde@intel.com, chethan.tumkur.narayan@intel.com, sukumar.ghorai@intel.com, amit.k.bag@intel.com Subject: [PATCH 2/2] Bluletooth: Add hardware reset callback to reset intel bluetooth chip Date: Tue, 21 Aug 2018 15:04:40 +0530 Message-Id: <1534844080-31240-2-git-send-email-raghuram.hegde@intel.com> In-Reply-To: <1534844080-31240-1-git-send-email-raghuram.hegde@intel.com> References: <1534844080-31240-1-git-send-email-raghuram.hegde@intel.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: From: Chethan T N Signed-off-by: Chethan T N Signed-off-by: Sukumar Ghorai Signed-off-by: Raghuram Hegde --- drivers/bluetooth/btusb.c | 2 ++ include/net/bluetooth/hci_core.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index cd2e5cf14ea5..908f8105b3af 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3083,6 +3083,7 @@ static int btusb_probe(struct usb_interface *intf, hdev->shutdown = btusb_shutdown_intel; hdev->set_diag = btintel_set_diag_mfg; hdev->set_bdaddr = btintel_set_bdaddr; + hdev->hw_reset = btintel_reset_bt; set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks); set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks); set_bit(HCI_QUIRK_NON_PERSISTENT_DIAG, &hdev->quirks); @@ -3095,6 +3096,7 @@ static int btusb_probe(struct usb_interface *intf, hdev->hw_error = btintel_hw_error; hdev->set_diag = btintel_set_diag; hdev->set_bdaddr = btintel_set_bdaddr; + hdev->hw_reset = btintel_reset_bt; set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks); set_bit(HCI_QUIRK_NON_PERSISTENT_DIAG, &hdev->quirks); } diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 0db1b9b428b7..9765ba78be2c 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -427,6 +427,7 @@ struct hci_dev { int (*post_init)(struct hci_dev *hdev); int (*set_diag)(struct hci_dev *hdev, bool enable); int (*set_bdaddr)(struct hci_dev *hdev, const bdaddr_t *bdaddr); + void (*hw_reset)(struct hci_dev *hdev, unsigned char code); }; #define HCI_PHY_HANDLE(handle) (handle & 0xff) -- 2.7.4