aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrashant Malani <[email protected]>2023-01-11 02:05:43 +0000
committerGreg Kroah-Hartman <[email protected]>2023-01-17 17:07:25 +0100
commit85af23df903ee14bfcba60c53e4f3b640f2310f8 (patch)
tree74d1d575b9947fe7c51a8cf1af447a0da8306571
parent9682b41e52cc9f42f5c33caf410464392adaef04 (diff)
usb: typec: altmodes/displayport: Use proper macro for pin assignment check
While looking at the DP configuration VDO to determine the peripheral configuration, the spec (Table 8-5: DisplayPort Configurations, VESA DisplayPort Alt Mode Standard v2.0) lists the options as "UFP_U as a DP Source/Sink Device". So, use the correct macro while performing this check. Effectively it's the same as the existing code, but the proposed macro describes the state a little better. No functional changes introduced. Cc: Heikki Krogerus <[email protected]> Signed-off-by: Prashant Malani <[email protected]> Reviewed-by: Benson Leung <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/typec/altmodes/displayport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
index 80d8c6c3be36..9a6860285fbe 100644
--- a/drivers/usb/typec/altmodes/displayport.c
+++ b/drivers/usb/typec/altmodes/displayport.c
@@ -425,7 +425,7 @@ static const char * const pin_assignments[] = {
*/
static u8 get_current_pin_assignments(struct dp_altmode *dp)
{
- if (DP_CONF_CURRENTLY(dp->data.conf) == DP_CONF_DFP_D)
+ if (DP_CONF_CURRENTLY(dp->data.conf) == DP_CONF_UFP_U_AS_DFP_D)
return DP_CAP_PIN_ASSIGN_DFP_D(dp->alt->vdo);
else
return DP_CAP_PIN_ASSIGN_UFP_D(dp->alt->vdo);