diff options
author | Jing Cai <jing.cai@mediatek.com> | 2023-06-29 01:54:56 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-08-11 21:41:37 +0300 |
commit | 25b6d7593a3af75a00374c9afe548a72794e5af0 (patch) | |
tree | c8a2b01d92d6166c9fb32aac89fd5dc48b8cc373 /drivers/bluetooth/btmtk.h | |
parent | ca58330c0b68c5597606f329c75e3c1edadc0f81 (diff) | |
download | linux-25b6d7593a3af75a00374c9afe548a72794e5af0.tar.xz |
Bluetooth: btmtk: introduce btmtk reset work
Introduce btmtk_reset_work which can be called whenever the firmware abort,
HCI command timeout, other fatal error happen.
Co-developed-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Jing Cai <jing.cai@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'drivers/bluetooth/btmtk.h')
-rw-r--r-- | drivers/bluetooth/btmtk.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/bluetooth/btmtk.h b/drivers/bluetooth/btmtk.h index fadc1a520652..75d8e71efcd3 100644 --- a/drivers/bluetooth/btmtk.h +++ b/drivers/bluetooth/btmtk.h @@ -120,8 +120,11 @@ struct btmtk_hci_wmt_params { u32 *status; }; +typedef int (*btmtk_reset_sync_func_t)(struct hci_dev *, void *); + struct btmediatek_data { u32 dev_id; + btmtk_reset_sync_func_t reset_sync; }; typedef int (*wmt_cmd_sync_func_t)(struct hci_dev *, @@ -136,6 +139,8 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname, int btmtk_setup_firmware(struct hci_dev *hdev, const char *fwname, wmt_cmd_sync_func_t wmt_cmd_sync); + +void btmtk_reset_sync(struct hci_dev *hdev); #else static inline int btmtk_set_bdaddr(struct hci_dev *hdev, @@ -156,4 +161,7 @@ static int btmtk_setup_firmware(struct hci_dev *hdev, const char *fwname, return -EOPNOTSUPP; } +static void btmtk_reset_sync(struct hci_dev *hdev) +{ +} #endif |