musb_debug.h 894 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * MUSB OTG driver debug defines
  3. *
  4. * Copyright 2005 Mentor Graphics Corporation
  5. * Copyright (C) 2005-2006 by Texas Instruments
  6. * Copyright (C) 2006-2007 Nokia Corporation
  7. *
  8. * SPDX-License-Identifier: GPL-2.0
  9. */
  10. #ifndef __MUSB_LINUX_DEBUG_H__
  11. #define __MUSB_LINUX_DEBUG_H__
  12. #define yprintk(facility, format, args...) \
  13. do { printk(facility "%s %d: " format , \
  14. __func__, __LINE__ , ## args); } while (0)
  15. #define WARNING(fmt, args...) yprintk(KERN_WARNING, fmt, ## args)
  16. #define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args)
  17. #define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args)
  18. #ifdef CONFIG_DEBUG_FS
  19. int musb_init_debugfs(struct musb *musb);
  20. void musb_exit_debugfs(struct musb *musb);
  21. #else
  22. static inline int musb_init_debugfs(struct musb *musb)
  23. {
  24. return 0;
  25. }
  26. static inline void musb_exit_debugfs(struct musb *musb)
  27. {
  28. }
  29. #endif
  30. #endif /* __MUSB_LINUX_DEBUG_H__ */