Re: [PATCH] usb: typec: tcpm: reset the port on removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 10, 2017 at 04:40:33PM +0300, Heikki Krogerus wrote:
> 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@xxxxxxxxxxxxxxx>

Makes sense.

Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>

> ---
>  drivers/usb/typec/tcpm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c
> index ffc26a3294e6..2a1656df62a8 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);
> -- 
> 2.14.2
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux