All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prashant Malani <pmalani@chromium.org>
To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Cc: bleung@chromium.org, Prashant Malani <pmalani@chromium.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Guillaume Ranquet <granquet@baylibre.com>,
	Macpaul Lin <macpaul.lin@mediatek.com>,
	Pablo Sun <pablo.sun@mediatek.com>
Subject: [PATCH 3/3] usb: typec: altmodes/displayport: Use proper macro for pin assignment check
Date: Wed, 11 Jan 2023 02:05:43 +0000	[thread overview]
Message-ID: <20230111020546.3384569-3-pmalani@chromium.org> (raw)
In-Reply-To: <20230111020546.3384569-1-pmalani@chromium.org>

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>
---
 drivers/usb/typec/altmodes/displayport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
index c0d65c93cefe..746bfbf3d557 100644
--- a/drivers/usb/typec/altmodes/displayport.c
+++ b/drivers/usb/typec/altmodes/displayport.c
@@ -426,7 +426,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);
-- 
2.39.0.314.g84b9a713c41-goog


  parent reply	other threads:[~2023-01-11  2:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  2:05 [PATCH 1/3] usb: typec: altmodes/displayport: Add pin assignment helper Prashant Malani
2023-01-11  2:05 ` [PATCH 2/3] usb: typec: altmodes/displayport: Fix pin assignment calculation Prashant Malani
2023-01-11  2:12   ` Benson Leung
2023-01-12 13:23   ` Heikki Krogerus
2023-01-11  2:05 ` Prashant Malani [this message]
2023-01-11  2:13   ` [PATCH 3/3] usb: typec: altmodes/displayport: Use proper macro for pin assignment check Benson Leung
2023-01-12 13:24   ` Heikki Krogerus
2023-01-11  2:11 ` [PATCH 1/3] usb: typec: altmodes/displayport: Add pin assignment helper Benson Leung
2023-01-12 13:21 ` Heikki Krogerus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230111020546.3384569-3-pmalani@chromium.org \
    --to=pmalani@chromium.org \
    --cc=bleung@chromium.org \
    --cc=granquet@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=macpaul.lin@mediatek.com \
    --cc=pablo.sun@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.