162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * Copyright (c) 2014 Redpine Signals Inc.
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any
562306a36Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above
662306a36Sopenharmony_ci * copyright notice and this permission notice appear in all copies.
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
962306a36Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1062306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1162306a36Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1262306a36Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1362306a36Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1462306a36Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1562306a36Sopenharmony_ci */
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#ifndef __RSI_DEBUGFS_H__
1862306a36Sopenharmony_ci#define __RSI_DEBUGFS_H__
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci#include "rsi_main.h"
2162306a36Sopenharmony_ci#include <linux/debugfs.h>
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#ifndef CONFIG_RSI_DEBUGFS
2462306a36Sopenharmony_cistatic inline int rsi_init_dbgfs(struct rsi_hw *adapter)
2562306a36Sopenharmony_ci{
2662306a36Sopenharmony_ci	return 0;
2762306a36Sopenharmony_ci}
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_cistatic inline void rsi_remove_dbgfs(struct rsi_hw *adapter)
3062306a36Sopenharmony_ci{
3162306a36Sopenharmony_ci	return;
3262306a36Sopenharmony_ci}
3362306a36Sopenharmony_ci#else
3462306a36Sopenharmony_cistruct rsi_dbg_files {
3562306a36Sopenharmony_ci	const char *name;
3662306a36Sopenharmony_ci	umode_t perms;
3762306a36Sopenharmony_ci	const struct file_operations fops;
3862306a36Sopenharmony_ci};
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_cistruct rsi_debugfs {
4162306a36Sopenharmony_ci	struct dentry *subdir;
4262306a36Sopenharmony_ci	struct rsi_dbg_ops *dfs_get_ops;
4362306a36Sopenharmony_ci	struct dentry *rsi_files[MAX_DEBUGFS_ENTRIES];
4462306a36Sopenharmony_ci};
4562306a36Sopenharmony_ciint rsi_init_dbgfs(struct rsi_hw *adapter);
4662306a36Sopenharmony_civoid rsi_remove_dbgfs(struct rsi_hw *adapter);
4762306a36Sopenharmony_ci#endif
4862306a36Sopenharmony_ci#endif
49