From patchwork Wed Oct 19 08:27:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5026 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp246412wrs; Wed, 19 Oct 2022 03:38:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM71QtOJpLK5vXvAlisNNMKOuc1ePQ+oWOCAH4fQwKtCToPX/e0DAbv0r7DlxrNQTsGuZmU2 X-Received: by 2002:aa7:cd10:0:b0:45c:2c83:1208 with SMTP id b16-20020aa7cd10000000b0045c2c831208mr6593908edw.81.1666175889997; Wed, 19 Oct 2022 03:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666175889; cv=none; d=google.com; s=arc-20160816; b=mo6hJSSTx85YTnukQbhNCyZBnhFQch4oKB8uR82j/xapQe8SIZwkhYTgAL1ndU5XZ9 dEZ+7UcMyQ6WqH50P0Vy0zwufE28x6SP43qWDjso0qLdSL5huzYP7vS32buw/W3toMY3 /9Iw3W535WVzZkwE6xFvUVtm0C7Pk/XsdTDS7iItL0Rb4yfLTioBer2+us3cYQSBI6dG M8msm/VEEy5jTD8Rxk/kuCuzCCKN4tUxYbbnC0tdH4HwNI38ob4VWzZGNAaplMBve6s3 Qr+kQSgCt0GwGkNNeYrzPxqVXzcAXsxgBwEC5tGg0NbYNZIKU92MRhOEkE1FvTNrrCen uzMA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yID6JSI9c4qrMGNkiKcqQFRuZTTAvLig/b/+WBaipYs=; b=V24GnNTuYmh8F9AEE0Ko9zrMWweWQ8Ldc4bRuee/9zHm5UumaT69HpsXvgRUFtDmoa 15xogitFOMnzBbtl44X7AloOY0FVKs2RDNAvOTHVAYHuQPFSGY/RCW7kcGAo6o7pif+C OyqdfTu7Mx1knm1qm+ggLkrsEPXgz17RCOlSPwxEz4VrEqEtHey0V9KdawWyqv7Vg9Ml x4t5GsmRzVW1SqoTSXS2m0ZPgQ5jif8onYIAWedHC0NvlnFEpbhVECPHhT8LwYuSfckK JTNj9fY1tmChnPkR8LsbE3tL8NqnEwzEvnZIu3qMzKut52+ru5hf9F/uc1aP6rs72GvB KEGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=px2hEt6L; 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=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a056402248b00b0044e8fe826a0si12475344eda.156.2022.10.19.03.37.43; Wed, 19 Oct 2022 03:38:09 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=px2hEt6L; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231747AbiJSKgo (ORCPT + 99 others); Wed, 19 Oct 2022 06:36:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231771AbiJSKgT (ORCPT ); Wed, 19 Oct 2022 06:36:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 782B1647E2; Wed, 19 Oct 2022 03:15:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5F36BB823C9; Wed, 19 Oct 2022 08:55:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 983D6C433D7; Wed, 19 Oct 2022 08:55:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169719; bh=HXWLNBSYweesCtmqEF+DBW6DuBS8+yAnyMRGdDnJ0Lo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=px2hEt6LsBLrjF/QZItAz4Ri3R9y4kZWfgMwUX9K/78xuEkId69mfvpQHyEifc+0R S8NL/P+ERgpw1NoKbpAZW4h99LiE5i42AhVurZ/lQ2bTTc1Eu3gAuMNuaQs96MwMBv xtT4vmq3NErhBL9g9gRxUFf259xIKWJUEX+bLfZY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Prashant Malani , Heikki Krogerus , Tzung-Bi Shih , Sasha Levin Subject: [PATCH 6.0 375/862] platform/chrome: cros_ec_typec: Add bit offset for DP VDO Date: Wed, 19 Oct 2022 10:27:42 +0200 Message-Id: <20221019083306.548843142@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747112050399654980?= X-GMAIL-MSGID: =?utf-8?q?1747112050399654980?= From: Prashant Malani [ Upstream commit 1903adae0464c1e1c36b132db474cb3aff7bc727 ] Use the right macro while constructing the DP_PORT_VDO to ensure the Pin Assignment offsets are correct. Fixes: 1ff5d97f070c ("platform/chrome: cros_ec_typec: Register port altmodes") Signed-off-by: Prashant Malani Acked-by: Heikki Krogerus Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20220819190807.1275937-2-pmalani@chromium.org Signed-off-by: Sasha Levin --- drivers/platform/chrome/cros_ec_typec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index de6ee0f926a6..4d81d8d45b73 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -25,7 +25,8 @@ #define DRV_NAME "cros-ec-typec" -#define DP_PORT_VDO (BIT(DP_PIN_ASSIGN_C) | BIT(DP_PIN_ASSIGN_D) | DP_CAP_DFP_D) +#define DP_PORT_VDO (DP_CONF_SET_PIN_ASSIGN(BIT(DP_PIN_ASSIGN_C) | BIT(DP_PIN_ASSIGN_D)) | \ + DP_CAP_DFP_D) /* Supported alt modes. */ enum {