diff options
| author | Andrei Kuchynski <akuchynski@chromium.org> | 2026-06-26 14:27:00 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-08 17:07:31 +0200 |
| commit | 4bc488bf8290dcf7ac221d286995563495c0ddc2 (patch) | |
| tree | 92ed21054a839e1f57217ff27dfcd7dc45cc61e0 /tools/perf/scripts/python | |
| parent | 41d541e3718db01668a4cd29815ee4b3b55f76d2 (diff) | |
usb: typec: Add helper to check cable altmode support
Introduce typec_cable_altmode_unsupported function to evaluate whether an
alternate mode is restricted based on the connected cable's properties.
Implement validation logic that parses the cable's identity to catch
incompatible setups early. Alternate modes are restricted over:
- cables lacking an identity header
- passive cables with USB 2.0 speed
- active cables unless they have corresponding plugs
The function returns false if the cable is not registered or the identifier
is not set.
Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
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-2-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
