2020-04-04 13:37:31 +03:00
/* SPDX-License-Identifier: GPL-2.0 */
2019-03-21 05:53:46 +03:00
/*
* mtu3_debug . h - debug header
*
* Copyright ( C ) 2019 MediaTek Inc .
*
* Author : Chunfeng Yun < chunfeng . yun @ mediatek . com >
*/
# ifndef __MTU3_DEBUG_H__
# define __MTU3_DEBUG_H__
# include <linux/debugfs.h>
2020-07-03 20:41:19 +03:00
struct ssusb_mtk ;
2019-03-21 05:53:46 +03:00
# define MTU3_DEBUGFS_NAME_LEN 32
struct mtu3_regset {
char name [ MTU3_DEBUGFS_NAME_LEN ] ;
struct debugfs_regset32 regset ;
} ;
struct mtu3_file_map {
const char * name ;
int ( * show ) ( struct seq_file * s , void * unused ) ;
} ;
# if IS_ENABLED(CONFIG_DEBUG_FS)
void ssusb_dev_debugfs_init ( struct ssusb_mtk * ssusb ) ;
2019-03-21 05:53:47 +03:00
void ssusb_dr_debugfs_init ( struct ssusb_mtk * ssusb ) ;
2019-03-21 05:53:46 +03:00
void ssusb_debugfs_create_root ( struct ssusb_mtk * ssusb ) ;
void ssusb_debugfs_remove_root ( struct ssusb_mtk * ssusb ) ;
# else
static inline void ssusb_dev_debugfs_init ( struct ssusb_mtk * ssusb ) { }
2019-03-21 05:53:47 +03:00
static inline void ssusb_dr_debugfs_init ( struct ssusb_mtk * ssusb ) { }
2019-03-21 05:53:46 +03:00
static inline void ssusb_debugfs_create_root ( struct ssusb_mtk * ssusb ) { }
static inline void ssusb_debugfs_remove_root ( struct ssusb_mtk * ssusb ) { }
# endif /* CONFIG_DEBUG_FS */
2019-03-21 05:53:48 +03:00
# if IS_ENABLED(CONFIG_TRACING)
void mtu3_dbg_trace ( struct device * dev , const char * fmt , . . . ) ;
# else
static inline void mtu3_dbg_trace ( struct device * dev , const char * fmt , . . . ) { }
# endif /* CONFIG_TRACING */
2019-03-21 05:53:46 +03:00
# endif /* __MTU3_DEBUG_H__ */