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 Reviewed-by: Benson Leung > --- > 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 > >