musb_debug.h 894 B

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