summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrei Kuchynski <akuchynski@chromium.org>2026-01-19 13:18:20 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-23 17:18:01 +0100
commit027b304ca3f6989f6946b5b3bcc727cf3f54774f (patch)
tree980fb1a0605f873a3ad8f0ffbd3cd2922313a018 /include/linux
parent4ec128733f68f77af452b0d97d8688cd33cd963e (diff)
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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb/typec_altmode.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/usb/typec_altmode.h b/include/linux/usb/typec_altmode.h
index 9197a4637a93..7e6c02d74b54 100644
--- a/include/linux/usb/typec_altmode.h
+++ b/include/linux/usb/typec_altmode.h
@@ -36,6 +36,7 @@ struct typec_altmode {
int mode;
u32 vdo;
unsigned int active:1;
+ u8 priority;
char *desc;
const struct typec_altmode_ops *ops;