Skip to content

Commit

Permalink
platform/chrome: cros_ec_typec: Update mux flags during partner removal
Browse files Browse the repository at this point in the history
In cros_typec_remove_partner(), we call
cros_typec_usb_disconnect_state() which sets the switches/muxes to be in
a disconnected state. This also happens in cros_typec_configure_mux().
However, unlike there, here the mux_flags variable hasn't been updated
to reflect that a disconnection has occurred. Update the flag here
accordingly.

Signed-off-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/chrome-platform/20220208184721.1697194-5-pmalani@chromium.org/
  • Loading branch information
Prashant Malani committed Feb 15, 2022
1 parent af34f11 commit b579f13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/platform/chrome/cros_ec_typec.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ static void cros_typec_remove_partner(struct cros_typec_data *typec,
cros_typec_unregister_altmodes(typec, port_num, true);

cros_typec_usb_disconnect_state(port);
port->mux_flags = USB_PD_MUX_NONE;

typec_unregister_partner(port->partner);
port->partner = NULL;
Expand Down

0 comments on commit b579f13

Please sign in to comment.