Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8741572rwl; Tue, 10 Jan 2023 18:44:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXuVKEWeiKXP0k/O8mTeM6IP4pMaNiDsE+HJ+p43jANVoYyAuhu+oigq2vUfcCEk1OQE2uWh X-Received: by 2002:a17:903:48b:b0:192:84aa:a247 with SMTP id jj11-20020a170903048b00b0019284aaa247mr54020921plb.30.1673405057310; Tue, 10 Jan 2023 18:44:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673405057; cv=none; d=google.com; s=arc-20160816; b=qvv1dVGaL6c+4KL2JSOf9yVnZXbyqFrZvlaogApTZTn6xXD05cSaDFN4NkgKzYcNw2 cCx9SVNUcdCaAEqUWAMiZCPVGU7b5J0bCnQ0sjN9CksDACPaDn4Wz+o/uCmITYgIo8gO F/iPmJTGx0dowuy3YD9LsBXMfIe6ntKfi7FqcRYqXmKAnrq7gzFf8q2lJuG3bcM8Egdy BzXsCdvMQA6EBs0Eoxzz0vN7DmduXUG6fvk+X91kzrwQL+gjjFoQrs0Y/BDXvflxBcO6 suX9MyAALg3F8ZVlj4NXeBULPyLfSZZh4ZPPN5HLOtvegFTyZu3Prw1++RCN3Tc6A3+M 2EPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aBFAbmggijOhKjLzf9il6pua2012DvMDyGgeIBZj5ls=; b=vsUGlXzMDOLaPQVt3aNZoo0Jz/+kcCBQ2xRd5GhjZH11GTJvc/9Xf/Hndp+seHq4V4 Sm04K6rDHNK/Cw4or8e6ZLIGhZ0n3aRg0Y2kUoIX64QLwVu0VT33vj/pTDMbU2ZHT15v YsEfvZiyKsM+9kB1goccdYdv9Iuk6IMROl/gXm9Rmu4ZBT8ULYp1V4Ga7nOq/u76D1bu ebzksoumAxCJdheq3oqdiQh3v6FJOgY4kg+CmG4I4AuNRIEJ3wj2q8b4ucRzUaFXvDNV C643lUj1vxj/SQUZI2b2RQl7u35PvXCdCSh+OyECwj+wMdyHziOaUQyyI072HeoWdIYr qSvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=m2MFXy1x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jf18-20020a170903269200b00193079ee523si12523444plb.98.2023.01.10.18.44.09; Tue, 10 Jan 2023 18:44:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=m2MFXy1x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235469AbjAKCGY (ORCPT + 53 others); Tue, 10 Jan 2023 21:06:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234935AbjAKCGI (ORCPT ); Tue, 10 Jan 2023 21:06:08 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC88FCF6 for ; Tue, 10 Jan 2023 18:06:07 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id z4-20020a17090a170400b00226d331390cso15542380pjd.5 for ; Tue, 10 Jan 2023 18:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aBFAbmggijOhKjLzf9il6pua2012DvMDyGgeIBZj5ls=; b=m2MFXy1xICKP7wXEyoTOm7zW0ptblveblZ8XnwBpeo2AKBwPeFD5jmjnjHS6MtgLnx KyKFP2HmIFuQmtQYccuYE92XM+qfF/VMEIgI4zwELU1woAYUZ7poA9Qb1r92ssWmC6wV ur7+Sh2GggjJFj+4LcSt6TetHYyIJ8lb2nBSQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aBFAbmggijOhKjLzf9il6pua2012DvMDyGgeIBZj5ls=; b=5gZLLfufbb6qePy0ym9lL+1KbJQuMOogt5qpzqFErGeybUs374ZWBybUMZeWYSCY8a dEg4UqRXrYxfS0D5g+GQmpXg2KWQOksub04O46vKq2VEon8SsM92Z8EB2EezqWCb97KK 3wlaxriypYwVHaaDfY0ePiDJF+uopnYAusJ7IScZLUdR0JSr4ERRuyfqaxIn6LeEKFEC J+p8/XoZqjuUhxikKTapgQji9SY+bhoFLXtC9xCdiQPbDg6ek7Zh9aemCBfLZG8T1wln 3hvc1eumSuocJFnR2ZXwIpF2rcp4++c6AK6luRBd6jc09wuUQTtvcpwW9mvZdHALxRZD F8bg== X-Gm-Message-State: AFqh2kpWWU5v1eRnIvjLVkn0pxehMdogI5MFXDwVsM1cwBwThtiO/RI5 oLH/rI17E2Ts/ywDaL1kXvEJZFnbk6H9rG6k X-Received: by 2002:a05:6a20:b285:b0:af:ec0f:f6b5 with SMTP id ei5-20020a056a20b28500b000afec0ff6b5mr72803915pzb.11.1673402766884; Tue, 10 Jan 2023 18:06:06 -0800 (PST) Received: from pmalani.c.googlers.com.com (33.5.83.34.bc.googleusercontent.com. [34.83.5.33]) by smtp.gmail.com with ESMTPSA id z6-20020a656646000000b00477a442d450sm7336738pgv.16.2023.01.10.18.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 18:06:06 -0800 (PST) From: Prashant Malani To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Cc: bleung@chromium.org, Prashant Malani , Heikki Krogerus , Greg Kroah-Hartman , Guillaume Ranquet , Macpaul Lin , Pablo Sun Subject: [PATCH 3/3] usb: typec: altmodes/displayport: Use proper macro for pin assignment check Date: Wed, 11 Jan 2023 02:05:43 +0000 Message-Id: <20230111020546.3384569-3-pmalani@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230111020546.3384569-1-pmalani@chromium.org> References: <20230111020546.3384569-1-pmalani@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 Signed-off-by: Prashant Malani --- 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