usb: typec: tcpm: Use configured PD revision for negotiation
authorCosmo Chou <chou.cosmo@gmail.com>
Tue, 13 May 2025 13:08:34 +0000 (21:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 May 2025 11:07:00 +0000 (13:07 +0200)
commitf9bd09ef2c04104a2be718fa8fc3939bb0ba1299
tree511379485198880351596f1610fe904c0c53c65e
parent324d45e53f1a36c88bc649dc39e0c8300a41be0a
usb: typec: tcpm: Use configured PD revision for negotiation

Initialize negotiated_rev and negotiated_rev_prime based on the port's
configured PD revision (rev_major) rather than always defaulting to
PD_MAX_REV. This ensures ports start PD communication using their
appropriate revision level.

This allows proper communication with devices that require specific
PD revision levels, especially for the hardware designed for PD 1.0
or 2.0 specifications.

Signed-off-by: Cosmo Chou <chou.cosmo@gmail.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20250513130834.1612602-1-chou.cosmo@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c