Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <heikki.krogerus@linux.intel.com>
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230111020546.3384569-3-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Prashant Malani and committed by
Greg Kroah-Hartman
85af23df 9682b41e

+1 -1
+1 -1
drivers/usb/typec/altmodes/displayport.c
··· 425 425 */ 426 426 static u8 get_current_pin_assignments(struct dp_altmode *dp) 427 427 { 428 - if (DP_CONF_CURRENTLY(dp->data.conf) == DP_CONF_DFP_D) 428 + if (DP_CONF_CURRENTLY(dp->data.conf) == DP_CONF_UFP_U_AS_DFP_D) 429 429 return DP_CAP_PIN_ASSIGN_DFP_D(dp->alt->vdo); 430 430 else 431 431 return DP_CAP_PIN_ASSIGN_UFP_D(dp->alt->vdo);