diff options
| author | Andrei Kuchynski <akuchynski@chromium.org> | 2026-01-19 13:18:22 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-01-23 17:18:01 +0100 |
| commit | be727d4000669a64a3ce6697669150d78bb2d492 (patch) | |
| tree | a576df8817aec4a1744507c486c42e9a7a859ac6 /include | |
| parent | fb2abc754672f769ca0bc36bdeb3c2f81927f446 (diff) | |
usb: typec: Introduce mode_selection bit
The port driver sets this bit for an alternate mode description to indicate
support for the mode selection feature. Once set, individual Alt Mode
drivers will no longer attempt to activate their respective modes within
their probe functions. This prevents race conditions and non-prioritized
activation.
The bit is not set by default. If left unset, the system retains the
current behavior where Alt Mode drivers manage their own activation logic.
Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260119131824.2529334-6-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/usb/typec.h | 1 | ||||
| -rw-r--r-- | include/linux/usb/typec_altmode.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h index dbb259d88526..d61ec38216fa 100644 --- a/include/linux/usb/typec.h +++ b/include/linux/usb/typec.h @@ -155,6 +155,7 @@ struct typec_altmode_desc { /* Only used with ports */ enum typec_port_data roles; bool inactive; + bool mode_selection; }; void typec_partner_set_pd_revision(struct typec_partner *partner, u16 pd_revision); diff --git a/include/linux/usb/typec_altmode.h b/include/linux/usb/typec_altmode.h index 70026f5f8f99..0513d333b797 100644 --- a/include/linux/usb/typec_altmode.h +++ b/include/linux/usb/typec_altmode.h @@ -37,6 +37,7 @@ struct typec_altmode { u32 vdo; unsigned int active:1; u8 priority; + bool mode_selection; char *desc; const struct typec_altmode_ops *ops; |
