Skip to content

Commit

Permalink
usb: typec: mux: intel: Handle alt mode HPD_HIGH
Browse files Browse the repository at this point in the history
According to the PMC Type C Subsystem (TCSS) Mux programming guide rev
0.6, when a device is transitioning to DP Alternate Mode state, if the
HPD_STATE (bit 7) field in the status update command VDO is set to
HPD_HIGH, the HPD_HIGH field in the Alternate Mode request “mode_data”
field (bit 14) should also be set. Ensure the bit is correctly handled
while issuing the Alternate Mode request.

Signed-off-by: Prashant Malani <pmalani@chromium.org>
Fixes: 6701adf ("usb: typec: driver for Intel PMC mux control")
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200429054432.134178-1-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Prashant Malani authored and Greg Kroah-Hartman committed May 5, 2020
1 parent 2bef9ae commit 7990be4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/typec/mux/intel_pmc_mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typec_mux_state *state)
req.mode_data |= (state->mode - TYPEC_STATE_MODAL) <<
PMC_USB_ALTMODE_DP_MODE_SHIFT;

if (data->status & DP_STATUS_HPD_STATE)
req.mode_data |= PMC_USB_DP_HPD_LVL <<
PMC_USB_ALTMODE_DP_MODE_SHIFT;

return pmc_usb_command(port, (void *)&req, sizeof(req));
}

Expand Down

0 comments on commit 7990be4

Please sign in to comment.