Thread (5 messages) 5 messages, 3 authors, 9d ago

Re: [PATCH] usb: typec: add trace point for typec_set_mode

From: Ahmad Fatoum <a.fatoum@pengutronix.de>
Date: 2026-06-18 11:01:26
Also in: linux-usb, lkml

Hello Heikki,

On 6/18/26 12:56 PM, Heikki Krogerus wrote:
On Wed, Jun 17, 2026 at 10:03:04PM +0200, Ahmad Fatoum wrote:
quoted
--- a/drivers/usb/typec/class.c
+++ b/drivers/usb/typec/class.c
@@ -20,6 +20,9 @@
 #include "class.h"
 #include "pd.h"
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/typec.h>
Those should probable go to drivers/usb/typec/trace.c and then you
need add something like this to drivers/usb/typec/Makefile:

 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

Thanks,
Ahmad

Thanks,
-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help