debug.h 853 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */
  3. #ifndef _QTN_FMAC_DEBUG_H_
  4. #define _QTN_FMAC_DEBUG_H_
  5. #include <linux/debugfs.h>
  6. #include "core.h"
  7. #include "bus.h"
  8. #ifdef CONFIG_DEBUG_FS
  9. void qtnf_debugfs_init(struct qtnf_bus *bus, const char *name);
  10. void qtnf_debugfs_remove(struct qtnf_bus *bus);
  11. void qtnf_debugfs_add_entry(struct qtnf_bus *bus, const char *name,
  12. int (*fn)(struct seq_file *seq, void *data));
  13. #else
  14. static inline void qtnf_debugfs_init(struct qtnf_bus *bus, const char *name)
  15. {
  16. }
  17. static inline void qtnf_debugfs_remove(struct qtnf_bus *bus)
  18. {
  19. }
  20. static inline void
  21. qtnf_debugfs_add_entry(struct qtnf_bus *bus, const char *name,
  22. int (*fn)(struct seq_file *seq, void *data))
  23. {
  24. }
  25. #endif /* CONFIG_DEBUG_FS */
  26. #endif /* _QTN_FMAC_DEBUG_H_ */