Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp382015rwb; Thu, 12 Jan 2023 07:22:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXu532P6yn4PaENKMLcCg7c4vdJkkcxKBw0UkFw7oAoY+mX33yyHJI4GIXNAmG7ekSWVUYK5 X-Received: by 2002:aa7:8658:0:b0:582:e4fd:bea8 with SMTP id a24-20020aa78658000000b00582e4fdbea8mr29574722pfo.30.1673536971203; Thu, 12 Jan 2023 07:22:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673536971; cv=none; d=google.com; s=arc-20160816; b=0si3mz5RdLVD3HrGfgtDszx5uMy7WENGe5go7Xh/+UOKlwWbC31KzAq9MLB2AXy47K pGR+i4uCQmpKBLcboBqf6O3y2ndh8PHV3kV3k5u5uEX43SB7Wmsl8wUGwOj9B+TQufff dme3mbwng5HEdbeZguF+digwXNXAX5uFMdBVZCpws8+Oybz7r05qA++y4f3FkX7T4E6w 7adAriz+MBOWPYLa8/+XTVs6IZf74BX5sfityzl3na0c/3JNaxpGKvZjwAFA2Mnn8XD1 q6u2AlnBx+ZppvcY3RSnuR//NesuqvwpjfZRa9gfpldzRDWJNsSIwfoC3iLDLD3kUKx8 E86A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WDxhWPZDQmGaC5k4BJcwiJP8UlyqapHoVXUcdnnpR9o=; b=h8pZCDYx+U5E7h3AQ/c6blqj31uVd7cJKRYvEacRaWLytuOePdNxm/xyTWcW5yFFXm wayHnYTQ2zrASsRKtsRCu1GW6COAj5m5XWpUkcKZGAdXsWyqIcttGnbYgFZxq9vyRRag MUokntD0A5BpfqRJOKE5UgxzHXPGF1QCw4MMnpmqYunn9pVAdLBImg9jt8s5Uer1A0tI iCl8R5KODRn+/AOT/c2+tjoOlILfeQ9dSOjxH0sb+5Gro5K+BO3l+pJ9++Jtxx6OxuUD hD/5hYrf0o3No2ILbWQMNF6/hqwmTcKxRJe1CIuOp4rNNMRHzResCH67GAobak9ECeTi 1tFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DGnNOZtH; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t15-20020a63460f000000b004769246309dsi17211534pga.501.2023.01.12.07.22.44; Thu, 12 Jan 2023 07:22:51 -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=@intel.com header.s=Intel header.b=DGnNOZtH; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231948AbjALNYm (ORCPT + 50 others); Thu, 12 Jan 2023 08:24:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbjALNYj (ORCPT ); Thu, 12 Jan 2023 08:24:39 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3E903AAB1; Thu, 12 Jan 2023 05:24:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673529878; x=1705065878; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=0+lriPcXh6VMXAhZsuIZVfsY1OyEBUI9UJKk/Tq6maM=; b=DGnNOZtHH+cf/gE/KmylyYYQsztA3dt98TugtI9iux0BiIDliHFUvWaF 5zaHWOuydiiESJdjCHr6oxPCzgP+vse+kp4ZHno9lmfGVlhUKU8RmMS6b 9hieZasVHDm1boSIEXoYLLZdKICKNbdUEqpdzSoEkGCxV6Gjid4rkGLmt KThiZbq4C0QMqbI3uyA5cjg20pMjXC0sd5b5LPg/D68+l4nbjvnAh2aEG FaH2INZlAHq+2sBmIEN7z5H2CuZN/DUCA29pvqEJ/aBcnY6AUl2DF1W2/ wp9wQXUTwrPagylViEYPTF2X8LFRL7hJkrG9apduo03RuUFDYUMEVTWfH Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10587"; a="311525713" X-IronPort-AV: E=Sophos;i="5.97,319,1669104000"; d="scan'208";a="311525713" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 05:24:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10587"; a="800208558" X-IronPort-AV: E=Sophos;i="5.97,319,1669104000"; d="scan'208";a="800208558" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 12 Jan 2023 05:24:34 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Thu, 12 Jan 2023 15:24:33 +0200 Date: Thu, 12 Jan 2023 15:24:33 +0200 From: Heikki Krogerus To: Prashant Malani Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, bleung@chromium.org, Greg Kroah-Hartman , Guillaume Ranquet , Macpaul Lin , Pablo Sun Subject: Re: [PATCH 3/3] usb: typec: altmodes/displayport: Use proper macro for pin assignment check Message-ID: References: <20230111020546.3384569-1-pmalani@chromium.org> <20230111020546.3384569-3-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230111020546.3384569-3-pmalani@chromium.org> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 On Wed, Jan 11, 2023 at 02:05:43AM +0000, Prashant Malani wrote: > 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 Reviewed-by: Heikki Krogerus > --- > 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 -- heikki