mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 01:52:03 +02:00
usb: typec: thunderbolt: Check cable altmode support
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> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://patch.msgid.link/20260626142702.1941182-3-akuchynski@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4bc488bf82
commit
07f0d51a8e
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user