summaryrefslogtreecommitdiff
path: root/drivers/usb/typec
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2017-10-10 16:40:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-17 11:56:11 +0200
commita6d5d230e0c2dbc710d473105d5652d3980da673 (patch)
tree8ca1dd3ae2d51b93ea6209ac23b8b8edaf7a4ff3 /drivers/usb/typec
parent4c13fec1ba555950112555b599dea8e0f0129d99 (diff)
usb: typec: tcpm: reset the port on removal
If a port is unregistered, all the devices attached to it must be unregistered as well. This will also make sure VBUS and VCONN are disabled. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec')
-rw-r--r--drivers/usb/typec/tcpm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c
index 8483d3e33853..2b735f3e5765 100644
--- a/drivers/usb/typec/tcpm.c
+++ b/drivers/usb/typec/tcpm.c
@@ -3602,6 +3602,7 @@ void tcpm_unregister_port(struct tcpm_port *port)
{
int i;
+ tcpm_reset_port(port);
for (i = 0; i < ARRAY_SIZE(port->port_altmode); i++)
typec_unregister_altmode(port->port_altmode[i]);
typec_unregister_port(port->typec_port);