0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef __MTU3_DEBUG_H__
0011 #define __MTU3_DEBUG_H__
0012
0013 #include <linux/debugfs.h>
0014
0015 struct ssusb_mtk;
0016
0017 #define MTU3_DEBUGFS_NAME_LEN 32
0018
0019 struct mtu3_regset {
0020 char name[MTU3_DEBUGFS_NAME_LEN];
0021 struct debugfs_regset32 regset;
0022 };
0023
0024 struct mtu3_file_map {
0025 const char *name;
0026 int (*show)(struct seq_file *s, void *unused);
0027 };
0028
0029 #if IS_ENABLED(CONFIG_DEBUG_FS)
0030 void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb);
0031 void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb);
0032 void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb);
0033 void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb);
0034
0035 #else
0036 static inline void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb) {}
0037 static inline void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb) {}
0038 static inline void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb) {}
0039 static inline void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb) {}
0040
0041 #endif
0042
0043 #if IS_ENABLED(CONFIG_TRACING)
0044 void mtu3_dbg_trace(struct device *dev, const char *fmt, ...);
0045
0046 #else
0047 static inline void mtu3_dbg_trace(struct device *dev, const char *fmt, ...) {}
0048
0049 #endif
0050
0051 #endif