lkml.org 
[lkml]   [2023]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] usb: typec: altmodes/displayport: Update active state
On Wed, Jan 18, 2023 at 03:15:15AM +0000, Prashant Malani wrote:
> 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.

The idea was that the port drivers take care of this, not the altmode
drivers.

thanks,

> 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

--
heikki

\
 
 \ /
  Last update: 2023-03-26 23:45    [W:0.086 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site