On Tue, Jul 30, 2024 at 10:12:46AM -0400, Steven Rostedt wrote:
> On Mon, 29 Jul 2024 16:34:22 +0200
> Uwe Kleine-König <[email protected]> wrote:
> 
> > diff --git a/include/trace/events/pwm.h b/include/trace/events/pwm.h
> > index 8022701c446d..8ba898fd335c 100644
> > --- a/include/trace/events/pwm.h
> > +++ b/include/trace/events/pwm.h
> > @@ -8,15 +8,135 @@
> >  #include <linux/pwm.h>
> >  #include <linux/tracepoint.h>
> >  
> > +#define TP_PROTO_pwm(args...)                                              
> >         \
> > +   TP_PROTO(struct pwm_device *pwm, args)
> > +
> > +#define TP_ARGS_pwm(args...)                                               
> >         \
> > +   TP_ARGS(pwm, args)
> > +
> > +#define TP_STRUCT__entry_pwm(args...)                                      
> >         \
> > +   TP_STRUCT__entry(                                                       
> > \
> > +           __field(unsigned int, chipid)                                   
> > \
> > +           __field(unsigned int, hwpwm)                                    
> > \
> > +           args)
> > +
> > +#define TP_fast_assign_pwm(args...)                                        
> >         \
> > +   TP_fast_assign(                                                         
> > \
> > +           __entry->chipid = pwm->chip->id;                                
> > \
> > +           __entry->hwpwm = pwm->hwpwm;                                    
> > \
> > +           args)
> > +
> > +#define TP_printk_pwm(fmt, args...)                                        
> >         \
> > +   TP_printk("pwmchip%u.%u: " fmt, __entry->chipid, __entry->hwpwm, args)
> > +
> > +#define __field_pwmwf(wf)                                                  
> > \
> > +   __field(u64, wf ## _period_length_ns)                                   
> > \
> > +   __field(u64, wf ## _duty_length_ns)                                     
> > \
> > +   __field(u64, wf ## _duty_offset_ns)                                     
> > \
> > +
> > +#define fast_assign_pwmwf(wf)                                              
> >         \
> > +   __entry->wf ## _period_length_ns = wf->period_length_ns;                
> > \
> > +   __entry->wf ## _duty_length_ns = wf->duty_length_ns;                    
> > \
> > +   __entry->wf ## _duty_offset_ns = wf->duty_offset_ns
> > +
> > +#define printk_pwmwf_format(wf)                                            
> >         \
> > +   "%lld/%lld [+%lld]"
> > +
> > +#define printk_pwmwf_formatargs(wf)                                        
> >         \
> > +   __entry->wf ## _duty_length_ns, __entry->wf ## _period_length_ns, 
> > __entry->wf ## _duty_offset_ns
> > +
> 
> The above is interesting. But if it works for you, then you do you ;-)

Thanks for the feedback. (I just pointed you to this thread in reply to
your other mail. Didn't notice you already replied here. Consider this
done.)

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature

Reply via email to