public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/5] USB Type-C alternate mode selection
@ 2025-09-09 12:30 Andrei Kuchynski
  2025-09-09 12:30 ` [PATCH RFC 1/5] usb: typec: Implement " Andrei Kuchynski
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Andrei Kuchynski @ 2025-09-09 12:30 UTC (permalink / raw)
  To: Heikki Krogerus, Abhishek Pandit-Subedi, Benson Leung,
	Jameson Thies, Tzung-Bi Shih, linux-usb, chrome-platform
  Cc: Guenter Roeck, Greg Kroah-Hartman, linux-kernel, Andrei Kuchynski

This patch series introduces a flexible mechanism for USB Type-C mode
selection, enabling into USB4 mode, Thunderbolt alternate mode, or
DisplayPort alternate mode.

New sysfs `mode_selection` attribute is exposed to provide user control
over mode selection. It triggers an alternate mode negotiation.
The mode selection logic attempts to enter prioritized modes sequentially.
A mode is considered successfully negotiated only when its alternate mode
driver explicitly reports a positive status. Alternate mode drivers are
required to report their mode entry status (either successful or failed).
If the driver does not report its status within a defined timeout period,
the system automatically proceeds to attempt entry into the next preferred
mode.

This series was tested on an Android OS device with kernel 6.16.
This series depends on the 'USB Type-C alternate mode priorities' series:
https://lore.kernel.org/all/20250905142206.4105351-1-akuchynski@chromium.org/ 

Andrei Kuchynski (5):
  usb: typec: Implement mode selection
  usb: typec: Expose mode_selection attribute via sysfs
  usb: typec: Report altmode entry status via callback
  usb: typec: ucsi: displayport: Propagate DP altmode entry result
  platform/chrome: cros_ec_typec: Propagate altmode entry result

 Documentation/ABI/testing/sysfs-class-typec  |  11 +
 drivers/platform/chrome/cros_ec_typec.c      |   9 +
 drivers/platform/chrome/cros_typec_altmode.c |  32 +-
 drivers/platform/chrome/cros_typec_altmode.h |   6 +
 drivers/usb/typec/altmodes/displayport.c     |  19 +-
 drivers/usb/typec/altmodes/thunderbolt.c     |  10 +
 drivers/usb/typec/class.c                    |  37 ++
 drivers/usb/typec/class.h                    |   4 +
 drivers/usb/typec/mode_selection.c           | 345 +++++++++++++++++++
 drivers/usb/typec/mode_selection.h           |  25 ++
 drivers/usb/typec/ucsi/displayport.c         |  10 +-
 include/linux/usb/typec_altmode.h            |  11 +
 include/linux/usb/typec_dp.h                 |   2 +
 include/linux/usb/typec_tbt.h                |   3 +
 14 files changed, 516 insertions(+), 8 deletions(-)

-- 
2.51.0.384.g4c02a37b29-goog


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-09-23 19:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-09 12:30 [PATCH RFC 0/5] USB Type-C alternate mode selection Andrei Kuchynski
2025-09-09 12:30 ` [PATCH RFC 1/5] usb: typec: Implement " Andrei Kuchynski
2025-09-09 12:30 ` [PATCH RFC 2/5] usb: typec: Expose mode_selection attribute via sysfs Andrei Kuchynski
2025-09-09 12:30 ` [PATCH RFC 3/5] usb: typec: Report altmode entry status via callback Andrei Kuchynski
2025-09-09 12:30 ` [PATCH RFC 4/5] usb: typec: ucsi: displayport: Propagate DP altmode entry result Andrei Kuchynski
2025-09-09 12:30 ` [PATCH RFC 5/5] platform/chrome: cros_ec_typec: Propagate " Andrei Kuchynski
2025-09-16 13:12 ` [PATCH RFC 0/5] USB Type-C alternate mode selection Heikki Krogerus
2025-09-16 16:47   ` Abhishek Pandit-Subedi
2025-09-17 12:28     ` Heikki Krogerus
2025-09-17 17:51       ` Abhishek Pandit-Subedi
2025-09-18  0:09         ` Abhishek Pandit-Subedi
2025-09-18  7:50           ` Greg Kroah-Hartman
2025-09-19 11:50         ` Heikki Krogerus
2025-09-19 16:58           ` Abhishek Pandit-Subedi
2025-09-22 13:50             ` Heikki Krogerus
2025-09-23 19:23               ` Abhishek Pandit-Subedi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox