blob: c7cefbcdaea4b904ad10002f18ad4e84d0f213b0 [file] [log] [blame]
Frederic Weisbecker12922112009-02-07 22:16:12 +01001#ifndef _TRACE_POWER_H
2#define _TRACE_POWER_H
3
4#include <linux/ktime.h>
5
6enum {
7 POWER_NONE = 0,
8 POWER_CSTATE = 1,
9 POWER_PSTATE = 2,
10};
11
12struct power_trace {
13#ifdef CONFIG_POWER_TRACER
14 ktime_t stamp;
15 ktime_t end;
16 int type;
17 int state;
18#endif
19};
20
21#ifdef CONFIG_POWER_TRACER
22extern void trace_power_start(struct power_trace *it, unsigned int type,
23 unsigned int state);
24extern void trace_power_mark(struct power_trace *it, unsigned int type,
25 unsigned int state);
26extern void trace_power_end(struct power_trace *it);
27#else
28static inline void trace_power_start(struct power_trace *it, unsigned int type,
29 unsigned int state) { }
30static inline void trace_power_mark(struct power_trace *it, unsigned int type,
31 unsigned int state) { }
32static inline void trace_power_end(struct power_trace *it) { }
33#endif
34
35#endif /* _TRACE_POWER_H */