]> git.karo-electronics.de Git - karo-tx-linux.git/blob - include/linux/pm-trace.h
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / include / linux / pm-trace.h
1 #ifndef PM_TRACE_H
2 #define PM_TRACE_H
3
4 #include <linux/types.h>
5 #ifdef CONFIG_PM_TRACE
6 #include <asm/pm-trace.h>
7
8 extern int pm_trace_enabled;
9 extern bool pm_trace_rtc_abused;
10
11 static inline bool pm_trace_rtc_valid(void)
12 {
13         return !pm_trace_rtc_abused;
14 }
15
16 static inline int pm_trace_is_enabled(void)
17 {
18        return pm_trace_enabled;
19 }
20
21 struct device;
22 extern void set_trace_device(struct device *);
23 extern void generate_pm_trace(const void *tracedata, unsigned int user);
24 extern int show_trace_dev_match(char *buf, size_t size);
25
26 #define TRACE_DEVICE(dev) do { \
27         if (pm_trace_enabled) \
28                 set_trace_device(dev); \
29         } while(0)
30
31 #else
32
33 static inline bool pm_trace_rtc_valid(void) { return true; }
34 static inline int pm_trace_is_enabled(void) { return 0; }
35
36 #define TRACE_DEVICE(dev) do { } while (0)
37 #define TRACE_RESUME(dev) do { } while (0)
38 #define TRACE_SUSPEND(dev) do { } while (0)
39
40 #endif
41
42 #endif