RFC usb: typec: New attribute files for USB mode
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | usb: typec: Add attribute file showing the USB mode of the portDocumentation/ drivers/ include/ | +82 | 0 replies | |
| 2/3 | usb: typec: Add attribute file showing the USB mode of the partnerDocumentation/ drivers/ include/ | +99 | 0 replies | |
| 3/3 | usb: typec: Add driver for Thunderbolt 3 Alternate Modedrivers/ drivers/ drivers/ | +320 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/3] usb: typec: New attribute files for USB mode
Hi Guenter,
These patches introduce the new sysfs attribute files that allow the user to see and also control the USB mode. The last patch just adds driver for the TBT3 alt mode. The series is made on top of:
https://lore.kernel.org/linux-usb/[email protected]/
What I'm proposing is that we introduce a new sysfs attribute file named "usb_mode" for both the port and partner devices. The file displays the supported USB modes (usb2, usb3, usb4) when read in with both types of devices.
If the user writes to the port attribute file a mode, that mode will be used as the value for the "USB mode" field in the Enter_USB message next time there is a connection. Changing the active mode of the port does not affect the current connection. However, if the user writes to the partner attribute file a mode, Data Reset message is expected to be send to the partner, and the new mode is to be used with the Enter_USB message that follows (as defined in the latest USB Power Delivery spec.).
So the attribute file is the same for both port and partner, but writing to it has different behaviour.
The new attribute files should work, but I want to make sure that the approach is acceptable?
thanks,
Heikki Krogerus (3):
usb: typec: Add attribute file showing the USB mode of the port
usb: typec: Add attribute file showing the USB mode of the partner
usb: typec: Add driver for Thunderbolt 3 Alternate Mode
Documentation/ABI/testing/sysfs-class-typec | 34 +++ drivers/usb/typec/altmodes/Kconfig | 9 + drivers/usb/typec/altmodes/Makefile | 2 + drivers/usb/typec/altmodes/thunderbolt.c | 309 ++++++++++++++++++++ drivers/usb/typec/class.c | 133 ++++++++- include/linux/usb/typec.h | 11 + 6 files changed, 497 insertions(+), 1 deletion(-) create mode 100644 drivers/usb/typec/altmodes/thunderbolt.c
Signature · 1 line
2.24.1