From: Prashant Malani Date: Fri, 20 Jan 2023 20:58:26 +0000 (+0000) Subject: usb: typec: altmodes/displayport: Update active state X-Git-Tag: v6.3-rc1~110^2~126 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25d6d1bfc213bce03d2e34c9e43477e01ffba7c3;p=thirdparty%2Fkernel%2Flinux.git usb: typec: altmodes/displayport: Update active state Update the altmode "active" state when we receive Acks for Enter and Exit Mode commands. Having the right state is necessary to change Pin Assignments using the 'pin_assignment" sysfs file. Cc: Heikki Krogerus Reviewed-by: Benson Leung Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20230120205827.740900-1-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c index 746bfbf3d5576..20db51471c98e 100644 --- a/drivers/usb/typec/altmodes/displayport.c +++ b/drivers/usb/typec/altmodes/displayport.c @@ -277,9 +277,11 @@ static int dp_altmode_vdm(struct typec_altmode *alt, case CMDT_RSP_ACK: switch (cmd) { case CMD_ENTER_MODE: + typec_altmode_update_active(alt, true); dp->state = DP_STATE_UPDATE; break; case CMD_EXIT_MODE: + typec_altmode_update_active(alt, false); dp->data.status = 0; dp->data.conf = 0; break;