Re: [PATCH] usb: typec: add trace point for typec_set_mode
From: Steven Rostedt
Date: Sat Jun 27 2026 - 05:23:30 EST
On Thu, 18 Jun 2026 14:31:00 +0300
Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> wrote:
> > > obj-$(CONFIG_TYPEC) += typec.o
> > > typec-y := class.o mux.o bus.o pd.o retimer.o mode_selection.o
> > > typec-$(CONFIG_ACPI) += port-mapper.o
> > > +typec-$(CONFIG_TRACING) += trace.o
> >
> > Thanks for the suggestion. I will do that for v2.
> >
> > I also saw there is Sashiko AI feedback on this patch[1], but I am not
> > familiar enough with how the event headers are used outside the kernel
> > to determine if that's actionable advice or if it can be ignored.
> >
> > Do you have an opinion on that?
> >
> > [1]:
> > https://sashiko.dev/#/patchset/20260617-typec_set_mode-tracepoint-v1-1-bdfbb39cfccd%40pengutronix.de
>
> It's correct. You need to use a private trace.h in this case, so just
> move it here: drivers/usb/typec/trace.h
>
> And also make sure you include everything needed in that header like
> it's telling you.
You may need more updates to make this work in a different directory.
Please read the comments in:
samples/trace_events/trace-events-sample.h
and
samples/trace_events/Makefile
-- Steve