From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, johan@kernel.org,
venkat.jayaraman@intel.com, pooja.katiyar@intel.com,
dmitry.baryshkov@oss.qualcomm.com
Subject: Re: [PATCH] usb: typec: ucsi: Invoke ucsi_run_command tracepoint
Date: Mon, 23 Feb 2026 16:57:44 +0200 [thread overview]
Message-ID: <aZxq6MO5YxkWyWNI@kuha> (raw)
In-Reply-To: <20260217103403.1956-1-loic.poulain@oss.qualcomm.com>
Tue, Feb 17, 2026 at 11:34:03AM +0100, Loic Poulain kirjoitti:
> 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>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.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
--
heikki
prev parent reply other threads:[~2026-02-23 14:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 10:34 Loic Poulain
2026-02-23 14:57 ` Heikki Krogerus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aZxq6MO5YxkWyWNI@kuha \
--to=heikki.krogerus@linux.intel.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=pooja.katiyar@intel.com \
--cc=venkat.jayaraman@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®