From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DADBC61DB3 for ; Wed, 11 Jan 2023 02:12:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234508AbjAKCM4 (ORCPT ); Tue, 10 Jan 2023 21:12:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjAKCMn (ORCPT ); Tue, 10 Jan 2023 21:12:43 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B809C76C for ; Tue, 10 Jan 2023 18:12:42 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id b9-20020a17090a7ac900b00226ef160dcaso13819646pjl.2 for ; Tue, 10 Jan 2023 18:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=irVeOhn1a5BJ5XA0SQi4wtUBmDMjtpLuPHDNe0+Ec60=; b=RqZBJHmo7cc9H+guxiqP2NX8/GQ8JClOF8pN+9RtpdWT1LbdrPxz4IacjBbU0PcjYt wDaAW6hmD277UmLUy/2Hm+hTc/iQnFcqMY4S++Pq7u+SmFyxYPVzDJpA/5S3GjsniwH9 dV7OLk1Am5qzV5vgzVM6OVlTolKHGBrk6eXc4jkhFADrt25K6FfrmE9paBWKRWKi+cia NAS2/GObFO4psH8um4kHhpZuAIjSMAo6Wt9Z+8h5JLVAHnnAwoa5GB2FU/m/nflsxRA5 rWqIAU4/h5D6kUOmxmzPOV64eurU2Vo3vS+Jmrg1pAP5Noy+rPYdrO3Vu1X6xMkZ557A hmRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=irVeOhn1a5BJ5XA0SQi4wtUBmDMjtpLuPHDNe0+Ec60=; b=qdiBQpDQe8q4QiiObwLLAzt/Dg2ELqgqh91Bqrewm5ecTM5L52cFRCTuWhHxZvbgHj 5sx8avfIvcdeAYK1f79o2Zogk3rLSrd4rW2t5L/d1lJI5380EAkeuvTwoDkKWCV8PONQ Xvvj2HKYm3IeKa44AdWgQWn0rWejuJW9C9SruiOgQFPbHLcgZCwbhq8KXLomBm9C9vGd 96ZBRyBRdwzKcvNSdb+kDfYcUfNa3BeBgkGuQU/xc73voEhKO/dvxwrEMSxPzafKdVOr YLa+S+jZ+BWbsy5xShRS/CgQt8aVqO+Dwoo//7gvYr4Q1NgblO2DTl3cznf2TLANi7UH DBxw== X-Gm-Message-State: AFqh2krGciAAw6YRvVFC4s3Yr8r82A37P2J9iA50yKYNZQQBwJUXhuFx 2DK7JM/9G6SMAbTzOgbZGrbBDQ== X-Google-Smtp-Source: AMrXdXsEVn2qTlKmP6JJUfhl6nqQZ6QlxNOmOSAQSZc5kHcdh34HBugnFRueVQPoQfUH25ZW5v0rfA== X-Received: by 2002:a17:902:b10e:b0:191:4367:7fde with SMTP id q14-20020a170902b10e00b0019143677fdemr226996plr.0.1673403161675; Tue, 10 Jan 2023 18:12:41 -0800 (PST) Received: from google.com ([2620:15c:9d:2:6a48:569f:20c1:dc8]) by smtp.gmail.com with ESMTPSA id p5-20020a170902bd0500b001932a9e4f2csm5657256pls.255.2023.01.10.18.12.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 18:12:40 -0800 (PST) Date: Tue, 10 Jan 2023 18:12:35 -0800 From: Benson Leung To: Prashant Malani Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, bleung@chromium.org, stable@vger.kernel.org, Heikki Krogerus , Greg Kroah-Hartman , Guillaume Ranquet , Macpaul Lin , Pablo Sun Subject: Re: [PATCH 2/3] usb: typec: altmodes/displayport: Fix pin assignment calculation Message-ID: References: <20230111020546.3384569-1-pmalani@chromium.org> <20230111020546.3384569-2-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="H3XDtXqWAjLUxnxA" Content-Disposition: inline In-Reply-To: <20230111020546.3384569-2-pmalani@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --H3XDtXqWAjLUxnxA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 11, 2023 at 02:05:42AM +0000, Prashant Malani wrote: > Commit c1e5c2f0cb8a ("usb: typec: altmodes/displayport: correct pin > assignment for UFP receptacles") fixed the pin assignment calculation > to take into account whether the peripheral was a plug or a receptacle. >=20 > But the "pin_assignments" sysfs logic was not updated. Address this by > using the macros introduced in the aforementioned commit in the sysfs > logic too. >=20 > Fixes: c1e5c2f0cb8a ("usb: typec: altmodes/displayport: correct pin assig= nment for UFP receptacles") > Cc: stable@vger.kernel.org > Cc: Heikki Krogerus > Signed-off-by: Prashant Malani Reviewed-by: Benson Leung > --- > drivers/usb/typec/altmodes/displayport.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec= /altmodes/displayport.c > index f9d4a7648bc9..c0d65c93cefe 100644 > --- a/drivers/usb/typec/altmodes/displayport.c > +++ b/drivers/usb/typec/altmodes/displayport.c > @@ -427,9 +427,9 @@ static const char * const pin_assignments[] =3D { > static u8 get_current_pin_assignments(struct dp_altmode *dp) > { > if (DP_CONF_CURRENTLY(dp->data.conf) =3D=3D DP_CONF_DFP_D) > - return DP_CAP_UFP_D_PIN_ASSIGN(dp->alt->vdo); > + return DP_CAP_PIN_ASSIGN_DFP_D(dp->alt->vdo); > else > - return DP_CAP_DFP_D_PIN_ASSIGN(dp->alt->vdo); > + return DP_CAP_PIN_ASSIGN_UFP_D(dp->alt->vdo); > } > =20 > static ssize_t > --=20 > 2.39.0.314.g84b9a713c41-goog >=20 --=20 Benson Leung Staff Software Engineer Chrome OS Kernel Google Inc. bleung@google.com Chromium OS Project bleung@chromium.org --H3XDtXqWAjLUxnxA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQCtZK6p/AktxXfkOlzbaomhzOwwgUCY74bEwAKCRBzbaomhzOw wh4+APwJLOrut48PsUp3KdWO6i0ZWSEbCPvHJvr5NOu69xx+MgEAneRgoN+BIzhp qyspS5trJHRIAs3eO2MXCdpL0L7OAQk= =/0xh -----END PGP SIGNATURE----- --H3XDtXqWAjLUxnxA--