Skip to content

Commit 17af505

Browse files
kyletsoadlgregkh
authored andcommitted
usb: typec: tcpm: Update PD of Type-C port upon pd_set
The PD of Type-C port needs to be updated in pd_set. Unlink the Type-C port device to the old PD before linking it to a new one. Fixes: cd099cd ("usb: typec: tcpm: Support multiple capabilities") Cc: stable@vger.kernel.org Signed-off-by: Kyle Tso <kyletso@google.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20240311172306.3911309-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b63f904 commit 17af505

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/usb/typec/tcpm/tcpm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6910,7 +6910,9 @@ static int tcpm_pd_set(struct typec_port *p, struct usb_power_delivery *pd)
69106910

69116911
port->port_source_caps = data->source_cap;
69126912
port->port_sink_caps = data->sink_cap;
6913+
typec_port_set_usb_power_delivery(p, NULL);
69136914
port->selected_pd = pd;
6915+
typec_port_set_usb_power_delivery(p, port->selected_pd);
69146916
unlock:
69156917
mutex_unlock(&port->lock);
69166918
return ret;

0 commit comments

Comments
 (0)