Message ID | 20230120205827.740900-2-pmalani@chromium.org |
---|---|
State | New |
Headers | show |
Series | [v2,1/2] usb: typec: altmodes/displayport: Update active state | expand |
On 1/20/23 12:58, Prashant Malani wrote: > Since the "active" state for partner altmodes is now being taken care of > by the altmode driver itself (specifically, DisplayPort altmode), we > no longer need to do so from the port driver. So remove the calls to > typec_altmode_update_active() from TCPM. > > Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> > Signed-off-by: Prashant Malani <pmalani@chromium.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> > --- > > Changes since v1: > - Patch first introduced in v2. > > drivers/usb/typec/tcpm/tcpm.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index 904c7b4ce2f0..0f5a9d4db105 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -1693,14 +1693,11 @@ static int tcpm_pd_svdm(struct tcpm_port *port, struct typec_altmode *adev, > } > break; > case CMD_ENTER_MODE: > - if (adev && pdev) { > - typec_altmode_update_active(pdev, true); > + if (adev && pdev) > *adev_action = ADEV_QUEUE_VDM_SEND_EXIT_MODE_ON_FAIL; > - } > return 0; > case CMD_EXIT_MODE: > if (adev && pdev) { > - typec_altmode_update_active(pdev, false); > /* Back to USB Operation */ > *adev_action = ADEV_NOTIFY_USB_AND_QUEUE_VDM; > return 0;
On Fri, Jan 20, 2023 at 1:00 PM Prashant Malani <pmalani@chromium.org> wrote: > > Since the "active" state for partner altmodes is now being taken care of > by the altmode driver itself (specifically, DisplayPort altmode), we > no longer need to do so from the port driver. So remove the calls to > typec_altmode_update_active() from TCPM. > > Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> > Signed-off-by: Prashant Malani <pmalani@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> > --- > > Changes since v1: > - Patch first introduced in v2. > > drivers/usb/typec/tcpm/tcpm.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index 904c7b4ce2f0..0f5a9d4db105 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -1693,14 +1693,11 @@ static int tcpm_pd_svdm(struct tcpm_port *port, struct typec_altmode *adev, > } > break; > case CMD_ENTER_MODE: > - if (adev && pdev) { > - typec_altmode_update_active(pdev, true); > + if (adev && pdev) > *adev_action = ADEV_QUEUE_VDM_SEND_EXIT_MODE_ON_FAIL; > - } > return 0; > case CMD_EXIT_MODE: > if (adev && pdev) { > - typec_altmode_update_active(pdev, false); > /* Back to USB Operation */ > *adev_action = ADEV_NOTIFY_USB_AND_QUEUE_VDM; > return 0; > -- > 2.39.0.246.g2a6d74b583-goog >
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 904c7b4ce2f0..0f5a9d4db105 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -1693,14 +1693,11 @@ static int tcpm_pd_svdm(struct tcpm_port *port, struct typec_altmode *adev, } break; case CMD_ENTER_MODE: - if (adev && pdev) { - typec_altmode_update_active(pdev, true); + if (adev && pdev) *adev_action = ADEV_QUEUE_VDM_SEND_EXIT_MODE_ON_FAIL; - } return 0; case CMD_EXIT_MODE: if (adev && pdev) { - typec_altmode_update_active(pdev, false); /* Back to USB Operation */ *adev_action = ADEV_NOTIFY_USB_AND_QUEUE_VDM; return 0;
Since the "active" state for partner altmodes is now being taken care of by the altmode driver itself (specifically, DisplayPort altmode), we no longer need to do so from the port driver. So remove the calls to typec_altmode_update_active() from TCPM. Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Prashant Malani <pmalani@chromium.org> --- Changes since v1: - Patch first introduced in v2. drivers/usb/typec/tcpm/tcpm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)