OSDN Git Service

usb: typec: Provide PD Specification Revision for cable and partner
authorBenson Leung <bleung@chromium.org>
Fri, 29 Jan 2021 06:14:02 +0000 (22:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Feb 2021 14:31:34 +0000 (15:31 +0100)
commitf5030e252687be6e999bd52feb1f79d515b2f684
treedbc11ca2a1b8af2a2a9611afc6d6306f9205f5eb
parent1ed8459d8f1060c87c7d66fe2d3cbbe4bc9cdd24
usb: typec: Provide PD Specification Revision for cable and partner

The USB Power Delivery specification Section 6.2.1.1.5 outlines
revision backward compatibility requirements starting from Revision 3.0.

The Port, the Cable Plug, and the Port Partner may support either
revision 2 or revision 3 independently, and communication between ports,
partners, and cables of different revisions are allowed under rules
that the parties agree to communicate between each other using the
lowest common operating revision.

This may mean that Port-to-Partner operating revision comms may be
different than Port-to-CablePlug operating revision comms. For example,
it is possible for a R3.0 port to communicate with a R3.0 partner
using R3.0 messages, while the R3.0 port (in the same session) must
communicate with the R2.0 cable using R2.0 messages only.

Introduce individual revision number properties for cable
and port partner so that the port can track them independently.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
Link: https://lore.kernel.org/r/20210129061406.2680146-3-bleung@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.h