Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (c) 2014 Redpine Signals Inc.
0003  *
0004  * Permission to use, copy, modify, and/or distribute this software for any
0005  * purpose with or without fee is hereby granted, provided that the above
0006  * copyright notice and this permission notice appear in all copies.
0007  *
0008  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
0009  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
0010  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
0011  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
0012  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
0013  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
0014  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0015  */
0016 
0017 #ifndef __RSI_DEBUGFS_H__
0018 #define __RSI_DEBUGFS_H__
0019 
0020 #include "rsi_main.h"
0021 #include <linux/debugfs.h>
0022 
0023 #ifndef CONFIG_RSI_DEBUGFS
0024 static inline int rsi_init_dbgfs(struct rsi_hw *adapter)
0025 {
0026     return 0;
0027 }
0028 
0029 static inline void rsi_remove_dbgfs(struct rsi_hw *adapter)
0030 {
0031     return;
0032 }
0033 #else
0034 struct rsi_dbg_files {
0035     const char *name;
0036     umode_t perms;
0037     const struct file_operations fops;
0038 };
0039 
0040 struct rsi_debugfs {
0041     struct dentry *subdir;
0042     struct rsi_dbg_ops *dfs_get_ops;
0043     struct dentry *rsi_files[MAX_DEBUGFS_ENTRIES];
0044 };
0045 int rsi_init_dbgfs(struct rsi_hw *adapter);
0046 void rsi_remove_dbgfs(struct rsi_hw *adapter);
0047 #endif
0048 #endif