The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Benson Leung <bleung@google.com>
To: Andrei Kuchynski <akuchynski@chromium.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/3] usb: typec: thunderbolt: Check cable altmode support
Date: Thu, 18 Jun 2026 00:23:01 +0000	[thread overview]
Message-ID: <ajM6ZRwStxPU6HBB@google.com> (raw)
In-Reply-To: <20260611122146.262184-3-akuchynski@chromium.org>

[-- Attachment #1: Type: text/plain, Size: 1138 bytes --]

On Thu, Jun 11, 2026 at 12:21:45PM +0000, Andrei Kuchynski wrote:
> Update the probe function to utilize the new
> typec_cable_altmode_unsupported() helper. If the cable doesn't support
> Thunderbolt altmode, don't initialize altmode_ops and prevent altmode
> from being activated.
> 
> Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>

Reviewed-by: Benson Leung <bleung@chromium.org>

> ---
>  drivers/usb/typec/altmodes/thunderbolt.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/typec/altmodes/thunderbolt.c b/drivers/usb/typec/altmodes/thunderbolt.c
> index 32250b94262a9..2eccdddf1b1f4 100644
> --- a/drivers/usb/typec/altmodes/thunderbolt.c
> +++ b/drivers/usb/typec/altmodes/thunderbolt.c
> @@ -284,6 +284,10 @@ static int tbt_altmode_probe(struct typec_altmode *alt)
>  
>  	alt->desc = "Thunderbolt3";
>  	typec_altmode_set_drvdata(alt, tbt);
> +
> +	if (typec_cable_altmode_unsupported(alt))
> +		return 0;
> +
>  	typec_altmode_set_ops(alt, &tbt_altmode_ops);
>  
>  	if (!alt->mode_selection && tbt_ready(alt)) {
> -- 
> 2.54.0.1099.g489fc7bff1-goog
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-06-18  0:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 12:21 [PATCH v1 0/3] Restrict alternate modes based on cable capabilities Andrei Kuchynski
2026-06-11 12:21 ` [PATCH v1 1/3] usb: typec: Add helper to check cable altmode support Andrei Kuchynski
2026-06-11 18:47   ` Benson Leung
2026-06-15 11:29     ` Andrei Kuchynski
2026-06-11 12:21 ` [PATCH v1 2/3] usb: typec: thunderbolt: Check " Andrei Kuchynski
2026-06-18  0:23   ` Benson Leung [this message]
2026-06-11 12:21 ` [PATCH v1 3/3] usb: typec: displayport: " Andrei Kuchynski
2026-06-18  0:22   ` Benson Leung

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=ajM6ZRwStxPU6HBB@google.com \
    --to=bleung@google.com \
    --cc=akuchynski@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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