pm-trace.h 728 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef PM_TRACE_H
  2. #define PM_TRACE_H
  3. #ifdef CONFIG_PM_TRACE
  4. #include <asm/pm-trace.h>
  5. #include <linux/types.h>
  6. extern int pm_trace_enabled;
  7. static inline int pm_trace_is_enabled(void)
  8. {
  9. return pm_trace_enabled;
  10. }
  11. struct device;
  12. extern void set_trace_device(struct device *);
  13. extern void generate_pm_trace(const void *tracedata, unsigned int user);
  14. extern int show_trace_dev_match(char *buf, size_t size);
  15. #define TRACE_DEVICE(dev) do { \
  16. if (pm_trace_enabled) \
  17. set_trace_device(dev); \
  18. } while(0)
  19. #else
  20. static inline int pm_trace_is_enabled(void) { return 0; }
  21. #define TRACE_DEVICE(dev) do { } while (0)
  22. #define TRACE_RESUME(dev) do { } while (0)
  23. #define TRACE_SUSPEND(dev) do { } while (0)
  24. #endif
  25. #endif