]> git.baikalelectronics.ru Git - kernel.git/commit
usb: typec: tcpci: update ROLE_CONTROL for DRP
authorBadhri Jagan Sridharan <badhri@google.com>
Tue, 1 Sep 2020 02:59:16 +0000 (19:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Sep 2020 11:03:50 +0000 (13:03 +0200)
commit95ddc957e28d5b8ce20679790c5a46d55db73556
tree3f0324e34acacbaa26dd8a77afb2c61ba7044b07
parent2c4aa3093198c1e24fcac4cd9a2772f4732e1205
usb: typec: tcpci: update ROLE_CONTROL for DRP

ROLE_CONTROL register would not have the actual CC terminations
unless the port does not set ROLE_CONTROL.DRP. For DRP ports,
CC_STATUS.cc1/cc2 indicates the final terminations applied
when TCPC enters potential_connect_as_source/_sink.
For DRP ports, infer port role from CC_STATUS and set corresponding
CC terminations before setting the orientation.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20200901025927.3596190-4-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpci.c