mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: typec: ucsi: Invoke ucsi_run_command tracepoint
@ 2026-02-17 10:34 Loic Poulain
  2026-02-23 14:57 ` Heikki Krogerus
  0 siblings, 1 reply; 2+ messages in thread
From: Loic Poulain @ 2026-02-17 10:34 UTC (permalink / raw)
  To: heikki.krogerus, gregkh
  Cc: linux-usb, linux-kernel, johan, venkat.jayaraman, pooja.katiyar,
	dmitry.baryshkov, Loic Poulain

The ucsi_run_command trace event is exposed in tracefs, but it never
produces any output because the UCSI core never invokes the associated
tracepoint. As a result, enabling the event under events/ucsi/ yields
no traces, preventing users from inspecting UCSI command sequencing.

Wire the tracepoint into the UCSI command path so that commands are
properly reported.

Example:
50.692342: ucsi_run_command: GET_CONNECTOR_STATUS -> OK (err=0)
50.692345: ucsi_connector_change: port0 status: change=4800, ...
51.750298: ucsi_run_command: GET_CABLE_PROPERTY -> FAIL (err=-5)
51.773360: ucsi_run_command: GET_CONNECTOR_STATUS -> OK (err=0)

Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
---
 drivers/usb/typec/ucsi/ucsi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index a7b388dc7fa0..965bb7f4e24e 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -234,6 +234,8 @@ static int ucsi_send_command_common(struct ucsi *ucsi, u64 cmd,
 	if (cci & UCSI_CCI_ERROR)
 		ret = ucsi_read_error(ucsi, connector_num);
 
+	trace_ucsi_run_command(cmd, ret);
+
 	mutex_unlock(&ucsi->ppm_lock);
 	return ret;
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-23 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-17 10:34 [PATCH] usb: typec: ucsi: Invoke ucsi_run_command tracepoint Loic Poulain
2026-02-23 14:57 ` Heikki Krogerus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®