Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 #undef TRACE_SYSTEM
0003 #define TRACE_SYSTEM pwm
0004 
0005 #if !defined(_TRACE_PWM_H) || defined(TRACE_HEADER_MULTI_READ)
0006 #define _TRACE_PWM_H
0007 
0008 #include <linux/pwm.h>
0009 #include <linux/tracepoint.h>
0010 
0011 DECLARE_EVENT_CLASS(pwm,
0012 
0013     TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state),
0014 
0015     TP_ARGS(pwm, state),
0016 
0017     TP_STRUCT__entry(
0018         __field(struct pwm_device *, pwm)
0019         __field(u64, period)
0020         __field(u64, duty_cycle)
0021         __field(enum pwm_polarity, polarity)
0022         __field(bool, enabled)
0023     ),
0024 
0025     TP_fast_assign(
0026         __entry->pwm = pwm;
0027         __entry->period = state->period;
0028         __entry->duty_cycle = state->duty_cycle;
0029         __entry->polarity = state->polarity;
0030         __entry->enabled = state->enabled;
0031     ),
0032 
0033     TP_printk("%p: period=%llu duty_cycle=%llu polarity=%d enabled=%d",
0034           __entry->pwm, __entry->period, __entry->duty_cycle,
0035           __entry->polarity, __entry->enabled)
0036 
0037 );
0038 
0039 DEFINE_EVENT(pwm, pwm_apply,
0040 
0041     TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state),
0042 
0043     TP_ARGS(pwm, state)
0044 
0045 );
0046 
0047 DEFINE_EVENT(pwm, pwm_get,
0048 
0049     TP_PROTO(struct pwm_device *pwm, const struct pwm_state *state),
0050 
0051     TP_ARGS(pwm, state)
0052 
0053 );
0054 
0055 #endif /* _TRACE_PWM_H */
0056 
0057 /* This part must be outside protection */
0058 #include <trace/define_trace.h>