public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: typec: altmodes/displayport: Update active state
@ 2023-01-18  3:15 Prashant Malani
  2023-01-18  4:34 ` Benson Leung
  2023-01-18  9:39 ` Heikki Krogerus
  0 siblings, 2 replies; 10+ messages in thread
From: Prashant Malani @ 2023-01-18  3:15 UTC (permalink / raw)
  To: linux-kernel, linux-usb; +Cc: bleung, Prashant Malani, stable, Heikki Krogerus

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.

Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode")
Cc: stable@vger.kernel.org
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Prashant Malani <pmalani@chromium.org>
---
 drivers/usb/typec/altmodes/displayport.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
index 06fb4732f8cd..bc1c556944d6 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;
-- 
2.39.0.314.g84b9a713c41-goog


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-01-20 18:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18  3:15 [PATCH] usb: typec: altmodes/displayport: Update active state Prashant Malani
2023-01-18  4:34 ` Benson Leung
2023-01-18  9:39 ` Heikki Krogerus
2023-01-18 18:26   ` Prashant Malani
2023-01-19  9:26     ` Heikki Krogerus
2023-01-19  9:55       ` Prashant Malani
2023-01-19 10:12         ` Prashant Malani
2023-01-20  9:16           ` Heikki Krogerus
2023-01-20  9:23             ` Heikki Krogerus
2023-01-20 18:57               ` Prashant Malani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox