aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorBadhri Jagan Sridharan <badhri@google.com>2021-03-17 23:56:04 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-18 09:35:18 +0100
commite00943e916782ae17ca05d654779a84f09481ab8 (patch)
tree6457b83610657e6b86f8087bb362ed1d0ca85a1e /drivers/usb
parentusb: mtu3: Fix spelling mistake "disabed" -> "disabled" (diff)
downloadlinux-dev-e00943e916782ae17ca05d654779a84f09481ab8.tar.xz
linux-dev-e00943e916782ae17ca05d654779a84f09481ab8.zip
usb: typec: tcpm: PD3.0 sinks can send Discover Identity even in device mode
>From 6.4.4.2 Structured VDM: • Either Port May be an Initiator of Structured VDMs except for the Enter Mode and Exit Mode Commands which Shall only be initiated by the DFP." The above implies that when PD3.0 link is established PD3.0 sinks can send out discover identity command/AMS once PD negotiation is done. This allows discovering identity for PD3.0 UFP ports as well. Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Badhri Jagan Sridharan <badhri@google.com> Link: https://lore.kernel.org/r/20210318065604.3757307-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/typec/tcpm/tcpm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 11d0c40bc47d..410856ec1702 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -3653,8 +3653,8 @@ static inline enum tcpm_state unattached_state(struct tcpm_port *port)
static void tcpm_check_send_discover(struct tcpm_port *port)
{
- if (port->data_role == TYPEC_HOST && port->send_discover &&
- port->pd_capable)
+ if ((port->data_role == TYPEC_HOST || port->negotiated_rev > PD_REV20) &&
+ port->send_discover && port->pd_capable)
tcpm_send_vdm(port, USB_SID_PD, CMD_DISCOVER_IDENT, NULL, 0);
port->send_discover = false;
}