1*ae078092SChunfeng Yun // SPDX-License-Identifier: GPL-2.0 2*ae078092SChunfeng Yun /* 3*ae078092SChunfeng Yun * mtu3_debug.h - debug header 4*ae078092SChunfeng Yun * 5*ae078092SChunfeng Yun * Copyright (C) 2019 MediaTek Inc. 6*ae078092SChunfeng Yun * 7*ae078092SChunfeng Yun * Author: Chunfeng Yun <chunfeng.yun@mediatek.com> 8*ae078092SChunfeng Yun */ 9*ae078092SChunfeng Yun 10*ae078092SChunfeng Yun #ifndef __MTU3_DEBUG_H__ 11*ae078092SChunfeng Yun #define __MTU3_DEBUG_H__ 12*ae078092SChunfeng Yun 13*ae078092SChunfeng Yun #include <linux/debugfs.h> 14*ae078092SChunfeng Yun 15*ae078092SChunfeng Yun #define MTU3_DEBUGFS_NAME_LEN 32 16*ae078092SChunfeng Yun 17*ae078092SChunfeng Yun struct mtu3_regset { 18*ae078092SChunfeng Yun char name[MTU3_DEBUGFS_NAME_LEN]; 19*ae078092SChunfeng Yun struct debugfs_regset32 regset; 20*ae078092SChunfeng Yun size_t nregs; 21*ae078092SChunfeng Yun }; 22*ae078092SChunfeng Yun 23*ae078092SChunfeng Yun struct mtu3_file_map { 24*ae078092SChunfeng Yun const char *name; 25*ae078092SChunfeng Yun int (*show)(struct seq_file *s, void *unused); 26*ae078092SChunfeng Yun }; 27*ae078092SChunfeng Yun 28*ae078092SChunfeng Yun #if IS_ENABLED(CONFIG_DEBUG_FS) 29*ae078092SChunfeng Yun void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb); 30*ae078092SChunfeng Yun void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb); 31*ae078092SChunfeng Yun void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb); 32*ae078092SChunfeng Yun 33*ae078092SChunfeng Yun #else 34*ae078092SChunfeng Yun static inline void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb) {} 35*ae078092SChunfeng Yun static inline void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb) {} 36*ae078092SChunfeng Yun static inline void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb) {} 37*ae078092SChunfeng Yun 38*ae078092SChunfeng Yun #endif /* CONFIG_DEBUG_FS */ 39*ae078092SChunfeng Yun 40*ae078092SChunfeng Yun #endif /* __MTU3_DEBUG_H__ */ 41