Commit a6d5d230 authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Greg Kroah-Hartman

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: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4c13fec1
...@@ -3602,6 +3602,7 @@ void tcpm_unregister_port(struct tcpm_port *port) ...@@ -3602,6 +3602,7 @@ void tcpm_unregister_port(struct tcpm_port *port)
{ {
int i; int i;
tcpm_reset_port(port);
for (i = 0; i < ARRAY_SIZE(port->port_altmode); i++) for (i = 0; i < ARRAY_SIZE(port->port_altmode); i++)
typec_unregister_altmode(port->port_altmode[i]); typec_unregister_altmode(port->port_altmode[i]);
typec_unregister_port(port->typec_port); typec_unregister_port(port->typec_port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment