Commit fb784f05 authored by Bing Zhao's avatar Bing Zhao Committed by Marcel Holtmann

Bluetooth: Add debugfs support to btmrvl driver

/debug/btmrvl/config/
/debug/btmrvl/status/

See Documentation/btmrvl.txt for details.

This patch incorporates a lot of comments given by
Nicolas Pitre <nico@marvell.com>. Many thanks to Nicolas Pitre.
Signed-off-by: default avatarRahul Tank <rahult@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 789221ec
...@@ -173,6 +173,7 @@ config BT_HCIVHCI ...@@ -173,6 +173,7 @@ config BT_HCIVHCI
config BT_MRVL config BT_MRVL
tristate "Marvell Bluetooth driver support" tristate "Marvell Bluetooth driver support"
select FW_LOADER select FW_LOADER
select DEBUG_FS
help help
The core driver to support Marvell Bluetooth devices. The core driver to support Marvell Bluetooth devices.
......
...@@ -15,7 +15,7 @@ obj-$(CONFIG_BT_HCIBTUART) += btuart_cs.o ...@@ -15,7 +15,7 @@ obj-$(CONFIG_BT_HCIBTUART) += btuart_cs.o
obj-$(CONFIG_BT_HCIBTUSB) += btusb.o obj-$(CONFIG_BT_HCIBTUSB) += btusb.o
obj-$(CONFIG_BT_HCIBTSDIO) += btsdio.o obj-$(CONFIG_BT_HCIBTSDIO) += btsdio.o
btmrvl-objs := btmrvl_main.o btmrvl-objs := btmrvl_main.o btmrvl_debugfs.o
obj-$(CONFIG_BT_MRVL) += btmrvl.o obj-$(CONFIG_BT_MRVL) += btmrvl.o
obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o obj-$(CONFIG_BT_MRVL_SDIO) += btmrvl_sdio.o
......
This diff is collapsed.
...@@ -79,6 +79,9 @@ struct btmrvl_private { ...@@ -79,6 +79,9 @@ struct btmrvl_private {
u8 *payload, u16 nb); u8 *payload, u16 nb);
int (*hw_wakeup_firmware) (struct btmrvl_private *priv); int (*hw_wakeup_firmware) (struct btmrvl_private *priv);
spinlock_t driver_lock; /* spinlock used by driver */ spinlock_t driver_lock; /* spinlock used by driver */
#ifdef CONFIG_DEBUG_FS
void *debugfs_data;
#endif
}; };
#define MRVL_VENDOR_PKT 0xFE #define MRVL_VENDOR_PKT 0xFE
...@@ -135,4 +138,9 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb); ...@@ -135,4 +138,9 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb);
int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd); int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd);
int btmrvl_prepare_command(struct btmrvl_private *priv); int btmrvl_prepare_command(struct btmrvl_private *priv);
#ifdef CONFIG_DEBUG_FS
void btmrvl_debugfs_init(struct hci_dev *hdev);
void btmrvl_debugfs_remove(struct hci_dev *hdev);
#endif
#endif /* _BTMRVL_DRV_H_ */ #endif /* _BTMRVL_DRV_H_ */
...@@ -658,6 +658,10 @@ struct btmrvl_private *btmrvl_add_card(void *card) ...@@ -658,6 +658,10 @@ struct btmrvl_private *btmrvl_add_card(void *card)
goto err_hci_register_dev; goto err_hci_register_dev;
} }
#ifdef CONFIG_DEBUG_FS
btmrvl_debugfs_init(hdev);
#endif
BT_DBG("Leave"); BT_DBG("Leave");
return priv; return priv;
...@@ -692,6 +696,10 @@ int btmrvl_remove_card(struct btmrvl_private *priv) ...@@ -692,6 +696,10 @@ int btmrvl_remove_card(struct btmrvl_private *priv)
kthread_stop(priv->main_thread.task); kthread_stop(priv->main_thread.task);
#ifdef CONFIG_DEBUG_FS
btmrvl_debugfs_remove(hdev);
#endif
hci_unregister_dev(hdev); hci_unregister_dev(hdev);
hci_free_dev(hdev); hci_free_dev(hdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment