musb_debug.h 942 B

12345678910111213141516171819202122232425262728293031323334
  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. void musb_dbg(struct musb *musb, const char *fmt, ...);
  18. #ifdef CONFIG_DEBUG_FS
  19. void musb_init_debugfs(struct musb *musb);
  20. void musb_exit_debugfs(struct musb *musb);
  21. #else
  22. static inline void musb_init_debugfs(struct musb *musb)
  23. {
  24. }
  25. static inline void musb_exit_debugfs(struct musb *musb)
  26. {
  27. }
  28. #endif
  29. #endif /* __MUSB_LINUX_DEBUG_H__ */