debug.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) 2015-2016 Quantenna Communications, Inc.
  3. * All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version 2
  8. * of the License, or (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. */
  16. #ifndef _QTN_FMAC_DEBUG_H_
  17. #define _QTN_FMAC_DEBUG_H_
  18. #include <linux/debugfs.h>
  19. #include "core.h"
  20. #include "bus.h"
  21. #ifdef CONFIG_DEBUG_FS
  22. void qtnf_debugfs_init(struct qtnf_bus *bus, const char *name);
  23. void qtnf_debugfs_remove(struct qtnf_bus *bus);
  24. void qtnf_debugfs_add_entry(struct qtnf_bus *bus, const char *name,
  25. int (*fn)(struct seq_file *seq, void *data));
  26. #else
  27. static inline void qtnf_debugfs_init(struct qtnf_bus *bus, const char *name)
  28. {
  29. }
  30. static inline void qtnf_debugfs_remove(struct qtnf_bus *bus)
  31. {
  32. }
  33. static inline void
  34. qtnf_debugfs_add_entry(struct qtnf_bus *bus, const char *name,
  35. int (*fn)(struct seq_file *seq, void *data))
  36. {
  37. }
  38. #endif /* CONFIG_DEBUG_FS */
  39. #endif /* _QTN_FMAC_DEBUG_H_ */