]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: typec: Add attribute file showing the USB Modes of the partner
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Wed, 16 Oct 2024 13:18:32 +0000 (16:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 06:41:45 +0000 (08:41 +0200)
commit2140a952c4e9c73993ae6d9c2cc674d263d4beab
tree867b229913281cd95c8e6cf8b654b31628449c4a
parent8060bcb109f2d9b85451e84a7a08042da40368df
usb: typec: Add attribute file showing the USB Modes of the partner

This attribute file shows the supported USB modes (USB 2.0,
USB 3.0 and USB4) of the partner, and the currently active
mode.

The active mode is determined primarily by checking the
speed of the enumerated USB device. When USB Power Delivery
is supported, the active USB mode should be always the mode
that was used with the Enter_USB Message, regardless of the
result of the USB enumeration. The port drivers can
separately assign the mode with a dedicated API.

If USB Power Delivery Identity is supplied for the partner
device, the supported modes are extracted from it.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20241016131834.898599-3-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/sysfs-class-typec
drivers/usb/typec/class.c
drivers/usb/typec/class.h
include/linux/usb/typec.h