[PATCH v2 02/22] usb: typec: Represent USB4 on the Type-C bus
Joshua Peisach
jpeisach at ubuntu.com
Mon Sep 7 06:31:34 PDT 2026
On Sun Sep 6, 2026 at 2:36 PM EDT, Sven Peter wrote:
> USB4 technically isn't alternate mode and entered using the EUDO and has
> no SVID or Discover Modes Response. We can still represent it like an
> altmode on the Type-C bus though by adding a mode kind. Exclude the USB4
> modes from any SVID-specific operations and driver binding, but allow
> consumers to observe their state through notifications.
>
> Like for other altmodes, expose the USB4 mode to sysfs: Add a mode_kind
> to be able to differentiate and then expose the EUDO, make the USB4
> active state read-only since we only represent firmware-negotiated USB4
> modes and omit anything that only applies to SVID-specific altmodes.
>
> Signed-off-by: Sven Peter <sven at kernel.org>
> ---
> Hope it's fine to add you as the contact for the sysfs documentation,
> happy to add myself otherwise though.
> ---
> Documentation/ABI/testing/sysfs-bus-typec | 36 ++++++++++++++
> drivers/usb/typec/bus.c | 67 ++++++++++++++++++++-----
> drivers/usb/typec/class.c | 83 +++++++++++++++++++++++++++----
> drivers/usb/typec/mode_selection.c | 6 ++-
> include/linux/usb/typec.h | 20 +++++++-
> include/linux/usb/typec_altmode.h | 10 +++-
> 6 files changed, 193 insertions(+), 29 deletions(-)
>
Reviewed-by: Joshua Peisach <jpeisach at ubuntu.com>
More information about the linux-arm-kernel
mailing list