spmi-dbgfs.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef _SPMI_DBGFS_H
  13. #define _SPMI_DBGFS_H
  14. #include <linux/debugfs.h>
  15. #ifdef CONFIG_DEBUG_FS
  16. int spmi_dfs_add_controller(struct spmi_controller *ctrl);
  17. int spmi_dfs_del_controller(struct spmi_controller *ctrl);
  18. #else
  19. static inline int spmi_dfs_add_controller(struct spmi_controller *ctrl)
  20. {
  21. return 0;
  22. }
  23. static inline int spmi_dfs_del_controller(struct spmi_controller *ctrl)
  24. {
  25. return 0;
  26. }
  27. #endif
  28. struct dentry *spmi_dfs_create_file(struct spmi_controller *ctrl,
  29. const char *name, void *data,
  30. const struct file_operations *fops);
  31. #endif /* _SPMI_DBGFS_H */