From patchwork Mon Nov 13 15:02:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 164533 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1261175vqg; Mon, 13 Nov 2023 07:02:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSYYRX4JCv9PwYUtoEHKrdAEVFkvmqE3VXar/aGaJXj+a21lbJVkb3tudo3Z5V7oPNPaGN X-Received: by 2002:a05:6808:1b27:b0:3af:a72a:96dc with SMTP id bx39-20020a0568081b2700b003afa72a96dcmr9797354oib.3.1699887775600; Mon, 13 Nov 2023 07:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699887775; cv=none; d=google.com; s=arc-20160816; b=JXP/nCkm+OT5AdyVcKCItzIKnuFiZ++ZCc3rjVvbCYackxusBPTQ4rMEFR84fFtdZ7 AS/xqSmUdvzf+MIb9FYpA1QV01VDiGSfPQYekyHh7om0NyeGwxrWa45kuKguPxbihJT+ KlmDmX8d3BFY8PItZOQjv/V9Q4gyypYkGRXJUGojwUzkFJE+K9YwzD2GRVG+Utg+7dVA 8FuEqyNIdOiECIewbaHq15oCmwrmdK5xXXyQQrDxPpRq7KrRC3ik9nMzYlWX+8pLmoPu Sw74FU8xB7eKytdIUCphMzbrQB4pTTeEJ4B+SIF+20zWvMEUHeMLa97BaKaKDKEgOZFT uoEQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=bT2cvUALCr2mMqdFMGZ2tjqVY+gzP0v0q78ZiKI5mS8=; fh=aYzDOMVJPgzY2BqIgsy7YmY1auJD+UwNXOvK3/+hpXU=; b=SvSh2LXRmuJYaKlnP0XTqu0LcMQWutkNRdARDiq9pzdrFFCm6MejHYggox/UEHKtmy 2WVQlncuLiHZL/SGR9X2AGZtZztSTHzQjCpA0YLlEYCc8RvYpt97yvMMIbkSueT/iwc9 uKHiDQIav3nRxFY7TBJaPgm7isweADk4Oe0qeKwTgc5RLbmbJ2i0m6tk//9wXAlcR6r8 OrhrMZbpOOsO2R4QRWaCi7V405KiSJsZkGw5b14pAX1+Ixk3jmYa4rVfi13JOn5TEfYQ ZzwqE/tJgU87/oIopwaHQyr6ZDdETzv6uNBaRUz4QKOL1SQRRkJ+ZOqmL/lLEbSreOnZ ZN3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=bL9qBvWc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id k13-20020a0568080e8d00b003b6d55e69e3si1986019oil.80.2023.11.13.07.02.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 07:02:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=bL9qBvWc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 63F898054EDB; Mon, 13 Nov 2023 07:02:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbjKMPCh (ORCPT + 29 others); Mon, 13 Nov 2023 10:02:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229626AbjKMPCf (ORCPT ); Mon, 13 Nov 2023 10:02:35 -0500 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 945E01A6 for ; Mon, 13 Nov 2023 07:02:32 -0800 (PST) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3ADBm2NR010353; Mon, 13 Nov 2023 09:02:22 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=b T2cvUALCr2mMqdFMGZ2tjqVY+gzP0v0q78ZiKI5mS8=; b=bL9qBvWc6yvuR50BY ZSS+pBS6m9bAvIlW6DRnRoHkFGFOOKqCAWR4DKAPgY6WTVCB+L/dO6+Jy+i20aDr r7uez1d0HDk65XeygwnXqf7Jt0Zs+/C/IxOGd0u8fFGZhuMfDLrLCSi0QlXMyYd+ eOj2ka1wxLkB0hEFffUGedNIrRSz3qCt6kHImUqnJRPVJdzNXq8WkMZ8GAhIVfuR pZdZ8+vw7yE/mVt5SAtS7t6ehsYiBDQuWN/e2mmQqSDFUvQWm8U8Be46xIoXRaor V04QZLLFrL6jw2RuZ1VphndjY3pTcrWfuoP4X5+9h044wpvihZ2cHaE2T+bYCE+c AnQDQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3ua6wpa05h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Nov 2023 09:02:22 -0600 (CST) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Mon, 13 Nov 2023 15:02:20 +0000 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.39 via Frontend Transport; Mon, 13 Nov 2023 15:02:20 +0000 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 76AFA11A8; Mon, 13 Nov 2023 15:02:20 +0000 (UTC) From: Charles Keepax To: CC: , Subject: [PATCH] mfd: cs42l43: Correct SoundWire port list Date: Mon, 13 Nov 2023 15:02:20 +0000 Message-ID: <20231113150220.1472294-1-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Proofpoint-GUID: sBuuQEMPcXTqsCaYhD7kLAMkpOP7nb-w X-Proofpoint-ORIG-GUID: sBuuQEMPcXTqsCaYhD7kLAMkpOP7nb-w X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 13 Nov 2023 07:02:52 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782461524302849168 X-GMAIL-MSGID: 1782461524302849168 Two ports are missing from the port list. Also the attempt to list them by function is rather misguided, there is nothing in the hardware that fixes a particular port to one function. Fix the missing ports and change to just listing them by the DPx naming scheme that is used throughout the rest of the driver. Fixes: ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver") Signed-off-by: Charles Keepax --- drivers/mfd/cs42l43-sdw.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/mfd/cs42l43-sdw.c b/drivers/mfd/cs42l43-sdw.c index 7392b3d2e6b96..6d67020396fb5 100644 --- a/drivers/mfd/cs42l43-sdw.c +++ b/drivers/mfd/cs42l43-sdw.c @@ -18,11 +18,13 @@ #include "cs42l43.h" enum cs42l43_sdw_ports { - CS42L43_DMIC_DEC_ASP_PORT = 1, - CS42L43_SPK_TX_PORT, - CS42L43_SPDIF_HP_PORT, - CS42L43_SPK_RX_PORT, - CS42L43_ASP_PORT, + CS42L43_DP1 = 1, + CS42L43_DP2, + CS42L43_DP3, + CS42L43_DP4, + CS42L43_DP5, + CS42L43_DP6, + CS42L43_DP7, }; static const struct regmap_config cs42l43_sdw_regmap = { @@ -55,9 +57,9 @@ static int cs42l43_read_prop(struct sdw_slave *sdw) prop->use_domain_irq = true; prop->paging_support = true; prop->wake_capable = true; - prop->source_ports = BIT(CS42L43_DMIC_DEC_ASP_PORT) | BIT(CS42L43_SPK_TX_PORT); - prop->sink_ports = BIT(CS42L43_SPDIF_HP_PORT) | - BIT(CS42L43_SPK_RX_PORT) | BIT(CS42L43_ASP_PORT); + prop->source_ports = BIT(CS42L43_DP1) | BIT(CS42L43_DP2) | + BIT(CS42L43_DP3) | BIT(CS42L43_DP4); + prop->sink_ports = BIT(CS42L43_DP5) | BIT(CS42L43_DP6) | BIT(CS42L43_DP7); prop->quirks = SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY; prop->scp_int1_mask = SDW_SCP_INT1_BUS_CLASH | SDW_SCP_INT1_PARITY | SDW_SCP_INT1_IMPL_DEF; @@ -78,11 +80,8 @@ static int cs42l43_read_prop(struct sdw_slave *sdw) dpn[i].max_word = 24; i++; } - /* - * All ports are 2 channels max, except the first one, - * CS42L43_DMIC_DEC_ASP_PORT. - */ - dpn[CS42L43_DMIC_DEC_ASP_PORT].max_ch = 4; + /* All ports are 2 channels max, except the first one. */ + dpn[CS42L43_DP1].max_ch = 4; nval = hweight32(prop->sink_ports); prop->sink_dpn_prop = devm_kcalloc(dev, nval, sizeof(*prop->sink_dpn_prop),