18c2ecf20Sopenharmony_ci/** 28c2ecf20Sopenharmony_ci * Copyright (c) 2014 Redpine Signals Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any 58c2ecf20Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above 68c2ecf20Sopenharmony_ci * copyright notice and this permission notice appear in all copies. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 98c2ecf20Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 108c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 118c2ecf20Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 128c2ecf20Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 138c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 148c2ecf20Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 158c2ecf20Sopenharmony_ci */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#ifndef __RSI_DEBUGFS_H__ 188c2ecf20Sopenharmony_ci#define __RSI_DEBUGFS_H__ 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#include "rsi_main.h" 218c2ecf20Sopenharmony_ci#include <linux/debugfs.h> 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#ifndef CONFIG_RSI_DEBUGFS 248c2ecf20Sopenharmony_cistatic inline int rsi_init_dbgfs(struct rsi_hw *adapter) 258c2ecf20Sopenharmony_ci{ 268c2ecf20Sopenharmony_ci return 0; 278c2ecf20Sopenharmony_ci} 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_cistatic inline void rsi_remove_dbgfs(struct rsi_hw *adapter) 308c2ecf20Sopenharmony_ci{ 318c2ecf20Sopenharmony_ci return; 328c2ecf20Sopenharmony_ci} 338c2ecf20Sopenharmony_ci#else 348c2ecf20Sopenharmony_cistruct rsi_dbg_files { 358c2ecf20Sopenharmony_ci const char *name; 368c2ecf20Sopenharmony_ci umode_t perms; 378c2ecf20Sopenharmony_ci const struct file_operations fops; 388c2ecf20Sopenharmony_ci}; 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_cistruct rsi_debugfs { 418c2ecf20Sopenharmony_ci struct dentry *subdir; 428c2ecf20Sopenharmony_ci struct rsi_dbg_ops *dfs_get_ops; 438c2ecf20Sopenharmony_ci struct dentry *rsi_files[MAX_DEBUGFS_ENTRIES]; 448c2ecf20Sopenharmony_ci}; 458c2ecf20Sopenharmony_ciint rsi_init_dbgfs(struct rsi_hw *adapter); 468c2ecf20Sopenharmony_civoid rsi_remove_dbgfs(struct rsi_hw *adapter); 478c2ecf20Sopenharmony_ci#endif 488c2ecf20Sopenharmony_ci#endif 49