rsi_debugfs.h 1.3 KB

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