1*4882a593Smuzhiyun /**
2*4882a593Smuzhiyun * Copyright (c) 2014 Redpine Signals Inc.
3*4882a593Smuzhiyun *
4*4882a593Smuzhiyun * Permission to use, copy, modify, and/or distribute this software for any
5*4882a593Smuzhiyun * purpose with or without fee is hereby granted, provided that the above
6*4882a593Smuzhiyun * copyright notice and this permission notice appear in all copies.
7*4882a593Smuzhiyun *
8*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*4882a593Smuzhiyun * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*4882a593Smuzhiyun * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*4882a593Smuzhiyun * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*4882a593Smuzhiyun * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*4882a593Smuzhiyun * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*4882a593Smuzhiyun * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*4882a593Smuzhiyun */
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun #ifndef __RSI_DEBUGFS_H__
18*4882a593Smuzhiyun #define __RSI_DEBUGFS_H__
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun #include "rsi_main.h"
21*4882a593Smuzhiyun #include <linux/debugfs.h>
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun #ifndef CONFIG_RSI_DEBUGFS
rsi_init_dbgfs(struct rsi_hw * adapter)24*4882a593Smuzhiyun static inline int rsi_init_dbgfs(struct rsi_hw *adapter)
25*4882a593Smuzhiyun {
26*4882a593Smuzhiyun return 0;
27*4882a593Smuzhiyun }
28*4882a593Smuzhiyun
rsi_remove_dbgfs(struct rsi_hw * adapter)29*4882a593Smuzhiyun static inline void rsi_remove_dbgfs(struct rsi_hw *adapter)
30*4882a593Smuzhiyun {
31*4882a593Smuzhiyun return;
32*4882a593Smuzhiyun }
33*4882a593Smuzhiyun #else
34*4882a593Smuzhiyun struct rsi_dbg_files {
35*4882a593Smuzhiyun const char *name;
36*4882a593Smuzhiyun umode_t perms;
37*4882a593Smuzhiyun const struct file_operations fops;
38*4882a593Smuzhiyun };
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun struct rsi_debugfs {
41*4882a593Smuzhiyun struct dentry *subdir;
42*4882a593Smuzhiyun struct rsi_dbg_ops *dfs_get_ops;
43*4882a593Smuzhiyun struct dentry *rsi_files[MAX_DEBUGFS_ENTRIES];
44*4882a593Smuzhiyun };
45*4882a593Smuzhiyun int rsi_init_dbgfs(struct rsi_hw *adapter);
46*4882a593Smuzhiyun void rsi_remove_dbgfs(struct rsi_hw *adapter);
47*4882a593Smuzhiyun #endif
48*4882a593Smuzhiyun #endif
49