2 #define TRACE_SYSTEM rtc
4 #if !defined(_TRACE_RTC_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/tracepoint.h>
10 DECLARE_EVENT_CLASS(rtc_time_alarm_class
,
12 TP_PROTO(time64_t secs
, int err
),
17 __field(time64_t
, secs
)
26 TP_printk("UTC (%lld) (%d)",
27 __entry
->secs
, __entry
->err
31 DEFINE_EVENT(rtc_time_alarm_class
, rtc_set_time
,
33 TP_PROTO(time64_t secs
, int err
),
38 DEFINE_EVENT(rtc_time_alarm_class
, rtc_read_time
,
40 TP_PROTO(time64_t secs
, int err
),
45 DEFINE_EVENT(rtc_time_alarm_class
, rtc_set_alarm
,
47 TP_PROTO(time64_t secs
, int err
),
52 DEFINE_EVENT(rtc_time_alarm_class
, rtc_read_alarm
,
54 TP_PROTO(time64_t secs
, int err
),
59 TRACE_EVENT(rtc_irq_set_freq
,
61 TP_PROTO(int freq
, int err
),
75 TP_printk("set RTC periodic IRQ frequency:%u (%d)",
76 __entry
->freq
, __entry
->err
80 TRACE_EVENT(rtc_irq_set_state
,
82 TP_PROTO(int enabled
, int err
),
84 TP_ARGS(enabled
, err
),
92 __entry
->enabled
= enabled
;
96 TP_printk("%s RTC 2^N Hz periodic IRQs (%d)",
97 __entry
->enabled
? "enable" : "disable",
102 TRACE_EVENT(rtc_alarm_irq_enable
,
104 TP_PROTO(unsigned int enabled
, int err
),
106 TP_ARGS(enabled
, err
),
109 __field(unsigned int, enabled
)
114 __entry
->enabled
= enabled
;
118 TP_printk("%s RTC alarm IRQ (%d)",
119 __entry
->enabled
? "enable" : "disable",
124 DECLARE_EVENT_CLASS(rtc_offset_class
,
126 TP_PROTO(long offset
, int err
),
128 TP_ARGS(offset
, err
),
131 __field(long, offset
)
136 __entry
->offset
= offset
;
140 TP_printk("RTC offset: %ld (%d)",
141 __entry
->offset
, __entry
->err
145 DEFINE_EVENT(rtc_offset_class
, rtc_set_offset
,
147 TP_PROTO(long offset
, int err
),
152 DEFINE_EVENT(rtc_offset_class
, rtc_read_offset
,
154 TP_PROTO(long offset
, int err
),
159 DECLARE_EVENT_CLASS(rtc_timer_class
,
161 TP_PROTO(struct rtc_timer
*timer
),
166 __field(struct rtc_timer
*, timer
)
167 __field(ktime_t
, expires
)
168 __field(ktime_t
, period
)
172 __entry
->timer
= timer
;
173 __entry
->expires
= timer
->node
.expires
;
174 __entry
->period
= timer
->period
;
177 TP_printk("RTC timer:(%p) expires:%lld period:%lld",
178 __entry
->timer
, __entry
->expires
, __entry
->period
182 DEFINE_EVENT(rtc_timer_class
, rtc_timer_enqueue
,
184 TP_PROTO(struct rtc_timer
*timer
),
189 DEFINE_EVENT(rtc_timer_class
, rtc_timer_dequeue
,
191 TP_PROTO(struct rtc_timer
*timer
),
196 DEFINE_EVENT(rtc_timer_class
, rtc_timer_fired
,
198 TP_PROTO(struct rtc_timer
*timer
),
203 #endif /* _TRACE_RTC_H */
205 /* This part must be outside protection */
206 #include <trace/define_trace.h>