]> git.ipfire.org Git - thirdparty/linux.git/commit
usb: typec: Expose alternate mode priority via sysfs
authorAndrei Kuchynski <akuchynski@chromium.org>
Mon, 19 Jan 2026 13:18:20 +0000 (13:18 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 16:18:01 +0000 (17:18 +0100)
commit027b304ca3f6989f6946b5b3bcc727cf3f54774f
tree980fb1a0605f873a3ad8f0ffbd3cd2922313a018
parent4ec128733f68f77af452b0d97d8688cd33cd963e
usb: typec: Expose alternate mode priority via sysfs

This patch introduces a priority sysfs attribute to the USB Type-C
alternate mode port interface. This new attribute allows user-space to
configure the numeric priority of alternate modes managing their preferred
order of operation. If a new priority value conflicts with an existing
mode's priority, the priorities of the conflicting mode and all subsequent
modes are automatically incremented to ensure uniqueness.

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/20260119131824.2529334-4-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/sysfs-class-typec
drivers/usb/typec/class.c
include/linux/usb/typec_altmode.h