The Linux Kernel Mailing List
 help / color / mirror / Atom feed
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, rdunlap@infradead.org,
	johan@kernel.org, akpm@linux-foundation.org,
	andriy.shevchenko@intel.com, pooja.katiyar@intel.com
Subject: Re: [PATCH] usb: typec: ucsi: ccg: Log firmware version and hardware info at probe
Date: Fri, 3 Jul 2026 15:36:43 +0300	[thread overview]
Message-ID: <akes203FaTAGM6fD@kuha> (raw)
In-Reply-To: <20260630130147.1385145-1-loic.poulain@oss.qualcomm.com>

Hi Loic,

On Tue, Jun 30, 2026 at 03:01:47PM +0200, Loic Poulain wrote:
> The CCG firmware version and silicon ID are read during probe but never
> logged, making it difficult to identify the hardware and the firmware
> running on the device.
> 
> Add dev_info messages to display the firmware version and silicon ID:
> 
>   ucsi_ccg 2-0008: CCG FW version: 3.9.0 build 0x0000
>   ucsi_ccg 2-0008: CCG silicon_id:0x1234 mode:1

I think that's mainly just noise. I think debugfs files would be a
better option for this information.

thanks,

> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
>  drivers/usb/typec/ucsi/ucsi_ccg.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
> index 4463c1ae96bd..2715bb7b53aa 100644
> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
> @@ -738,11 +738,21 @@ static int get_fw_info(struct ucsi_ccg *uc)
>  	uc->fw_version = CCG_VERSION(uc->version[FW2].app.ver) |
>  			CCG_VERSION_PATCH(uc->version[FW2].app.patch);
>  
> +	dev_info(uc->dev, "CCG FW version: %d.%d.%d build 0x%04x\n",
> +		 (uc->version[FW2].app.ver & CCG_VERSION_MAJ_MASK) >> CCG_VERSION_MAJ_SHIFT,
> +		 (uc->version[FW2].app.ver & CCG_VERSION_MIN_MASK) >> CCG_VERSION_MIN_SHIFT,
> +		 uc->version[FW2].app.patch,
> +		 le16_to_cpu(uc->version[FW2].app.build));
> +
>  	err = ccg_read(uc, CCGX_RAB_DEVICE_MODE, (u8 *)(&uc->info),
>  		       sizeof(uc->info));
>  	if (err < 0)
>  		return err;
>  
> +	dev_info(uc->dev, "CCG silicon_id:0x%04x mode:%u\n",
> +		 le16_to_cpu(uc->info.silicon_id),
> +		 (uc->info.mode & CCG_DEVINFO_FWMODE_MASK) >> CCG_DEVINFO_FWMODE_SHIFT);
> +
>  	return 0;
>  }
>  
> -- 
> 2.34.1

-- 
heikki

      reply	other threads:[~2026-07-03 12:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 13:01 [PATCH] usb: typec: ucsi: ccg: Log firmware version and hardware info at probe Loic Poulain
2026-07-03 12:36 ` 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=akes203FaTAGM6fD@kuha \
    --to=heikki.krogerus@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@intel.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=rdunlap@infradead.org \
    /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