vcap_api_debugfs.h 977 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /* Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries.
  3. * Microchip VCAP API
  4. */
  5. #ifndef __VCAP_API_DEBUGFS__
  6. #define __VCAP_API_DEBUGFS__
  7. #include <linux/types.h>
  8. #include <linux/debugfs.h>
  9. #include <linux/netdevice.h>
  10. #include "vcap_api.h"
  11. #if defined(CONFIG_DEBUG_FS)
  12. void vcap_port_debugfs(struct device *dev, struct dentry *parent,
  13. struct vcap_control *vctrl,
  14. struct net_device *ndev);
  15. /* Create a debugFS entry for a vcap instance */
  16. struct dentry *vcap_debugfs(struct device *dev, struct dentry *parent,
  17. struct vcap_control *vctrl);
  18. #else
  19. static inline void vcap_port_debugfs(struct device *dev, struct dentry *parent,
  20. struct vcap_control *vctrl,
  21. struct net_device *ndev)
  22. {
  23. }
  24. static inline struct dentry *vcap_debugfs(struct device *dev,
  25. struct dentry *parent,
  26. struct vcap_control *vctrl)
  27. {
  28. return NULL;
  29. }
  30. #endif
  31. #endif /* __VCAP_API_DEBUGFS__ */