usb: typec: tcpm: Add support for parsing pd-revision DT property
authorAmit Sunil Dhamne <amitsd@google.com>
Wed, 11 Dec 2024 03:07:08 +0000 (19:07 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Dec 2024 07:56:04 +0000 (08:56 +0100)
commit8ecf60c3b3d4599d2e643bc88c303376a404ad13
tree7079fe84d114e921d078a62a8e1167cb877c5411
parent1ed739929c914fa1f1a16c8f2e76814e9812e1b0
usb: typec: tcpm: Add support for parsing pd-revision DT property

Add support for parsing "pd-revision" DT property in TCPM and store PD
revision and version supported by the Type-C connnector.

It should be noted that the PD revision is the maximum possible revision
supported by the port. This is different from the 2 bit revision set in
PD msg headers. The purpose of the 2 bit revision value is to negotiate
between Rev 2.X & 3.X spec rev as part of contract negotiation, while
this is used for Get_Revision AMS after a contract is in place.

Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20241210-get_rev_upstream-v2-2-d0094e52d48f@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c