From patchwork Fri Mar 10 17:32:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mahapatra, Amit Kumar" X-Patchwork-Id: 1756108 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=UMmMZbcB; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PZsF849XFz1yWt for ; Mon, 13 Mar 2023 20:44:28 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4PZsF839kkz301F for ; Mon, 13 Mar 2023 20:44:28 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=UMmMZbcB; dkim-atps=neutral X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=amd.com (client-ip=2a01:111:f400:7e8d::613; helo=nam04-bn8-obe.outbound.protection.outlook.com; envelope-from=amit.kumar-mahapatra@amd.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=UMmMZbcB; dkim-atps=neutral Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on20613.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8d::613]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4PYCt2112Dz3cd4; Sat, 11 Mar 2023 04:37:12 +1100 (AEDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fDRNQfAeBMsXvxLpEyufBkTljpAjB62YDYa9RYwlK0YKPvuapqQ17AIDfTzJ2kcSUA+FZZdrQKUEtWqloHO67hQlyNlUdiO2YShmb9aKyNJhlrkCkLQj85fDPUIia8wrjlC7PLLF2GuHnel8QwIn9qUpLJaOzP6TtbiMjZBDVLXVF+IRuBGjZMG7YZRzv+/BwwUM4ymeDFtXsc1hrwyg/vcRh2VI54D8+THIPovfrhhV6dEQeJ7l8+VWCeQe60/m4vZHgbVY8la3TJS1bOhDOMPFCA7ayRkZEGUsXO/SYjR04DRE+VAe5ffmDiu6HBaPXCW9VlLT8seFGhijin4y9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TNYJPkJ8aaPK5awYxnsnKWkYB0u9T5qlqGRNHD3pdtg=; b=e947nPG59j9p0X4xa/4COFk6qswBkYRsXUuNWBp6av8fkTAU/p3j3OCOAJmDlbDnLFttMj8WkUtrxRZaG0V9QC/llHn3OSoW/GHzHk1nOatbE0h/Mqe0i3PVyi0fXpH6nq/MGLmvn/uXwaxKVPrC357YjAuF1/0hasMGidgsIvkVTq2sEnEWF5TUS4Jf+PjlYgwfCcgi46wDjj/Am8k9tUMFdmSMIRgHFujBpD+KK5ZMWLtD1DwrAM4D7xQcEWoyZWlRyjBraOSO/awXdDiN4CirQwhldwAK2Xu8riYBeRac+Na/gp+4swUmwaS3nKrNyuUGKWMwlV6JFeH3DCB5KQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TNYJPkJ8aaPK5awYxnsnKWkYB0u9T5qlqGRNHD3pdtg=; b=UMmMZbcBWItbrIBaBOta5O/k2bX3+xyUZrN07VP0ZW4Ks53SYj2K5Q+O5daGC5AZmW/Qq3MzqoMBa0VPOBwF9U5CN+UCZpSFb/IR3tiAmwHq3rhG+es5e4OpqDVJXU5mXlwXN0P97UWuP5b45mTm/3zAVD3VgdyzbKBNEF8Ek7s= Received: from BN8PR04CA0023.namprd04.prod.outlook.com (2603:10b6:408:70::36) by BN9PR12MB5290.namprd12.prod.outlook.com (2603:10b6:408:103::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Fri, 10 Mar 2023 17:36:52 +0000 Received: from BN8NAM11FT082.eop-nam11.prod.protection.outlook.com (2603:10b6:408:70:cafe::c6) by BN8PR04CA0023.outlook.office365.com (2603:10b6:408:70::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.20 via Frontend Transport; Fri, 10 Mar 2023 17:36:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BN8NAM11FT082.mail.protection.outlook.com (10.13.176.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.20 via Frontend Transport; Fri, 10 Mar 2023 17:36:52 +0000 Received: from SATLEXMB08.amd.com (10.181.40.132) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 10 Mar 2023 11:36:51 -0600 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB08.amd.com (10.181.40.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 10 Mar 2023 09:36:51 -0800 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Fri, 10 Mar 2023 11:36:24 -0600 From: Amit Kumar Mahapatra To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH V6 08/15] ALSA: hda: cs35l41: Replace all spi->chip_select references with function call Date: Fri, 10 Mar 2023 23:02:10 +0530 Message-ID: <20230310173217.3429788-9-amit.kumar-mahapatra@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230310173217.3429788-1-amit.kumar-mahapatra@amd.com> References: <20230310173217.3429788-1-amit.kumar-mahapatra@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT082:EE_|BN9PR12MB5290:EE_ X-MS-Office365-Filtering-Correlation-Id: a9861984-9939-4d87-1435-08db218e0955 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bdnGfZoG9qzd2wnQn8OFchhoKOS+sgoSCITP3ZeO4aNDSx44PjwjLeJYnAPLo3ZEVtW3N6LCJ+veH6LPWomsyGBuYgEdbAMAuMq6fuCIM49t8Bm247zTDNIYJNNfoCLHQkpxa3amxxZC5k9FTgU8tKSni9DMdQuXpt7kv6dTkMbtl/sd5XvhX3v2w/clW3/wQcveHEEPGF13YrDFq792cwDj6OavXgd2CFdEiSHRky4YizeS9ylEe+m2amd60i7+h6vPBGpXGCH2aRoHfraNbnXWtBfjGbTzUqksUsoaoFWCZB7ynIYwbguT9Ju4LjIXlN4fRBQFPyNin7w/bAe25+LQGhq7CYr87+GUYKWEyDfTw79+zuyIBAhErzAtGjQjOlhzKLBG58ECb04uhdlz1IQnImSc2nDFy1DEm/Z9tL71oHSE8ehZlsjuKQ27KcVPbBIZ2YEZKXY2lr6L+vnQpAPWY6E/thYSwn1+n5W1Leb8AdNwm1Bu38o9nJcr5qBHIyVqA6cWo8iGmsrO4g8a+KBrNJaYmXtOJFMzymB75oTQIoEAxIN9zi0gcCG1/maSfoK0JV8MahRIq1agAGa+bp5zBm13IshtUmxPuqFnEAr1Lagm4qX9rDT8OWu7v2U1aE4TpSuHTPKYmkIlZ3iJv/LhLng9vjtEgQLsergEeDmAEs2qEBNWQ3hB8ctRTrvkdBHUymDj24KGCjphaDHVL9U8SgNpiMNtn87dNLVYO10iCD5oFKgvQ85/NHeN6NZWuHTG5Ixa3phUqCqFiNvZ+SJkPJRtdH+JwNaAIp10eWVuDhSsom4xe95LTh2hp7bFl1y8AfpoBGkGQTs0vx63oR3MPMgTjC26gcIMwCanaAA= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230025)(4636009)(376002)(136003)(396003)(39860400002)(346002)(451199018)(46966006)(36840700001)(40470700004)(36756003)(82740400003)(36860700001)(186003)(40460700003)(26005)(426003)(2616005)(6666004)(41300700001)(83380400001)(110136005)(47076005)(8676002)(70586007)(8936002)(2906002)(70206006)(4326008)(1076003)(40480700001)(7336002)(7416002)(7276002)(5660300002)(7366002)(7406005)(316002)(54906003)(356005)(86362001)(336012)(478600001)(81166007)(82310400005)(921005)(1191002)(2101003)(41080700001)(83996005)(84006005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 17:36:52.7138 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a9861984-9939-4d87-1435-08db218e0955 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT082.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5290 X-Mailman-Approved-At: Mon, 13 Mar 2023 20:42:54 +1100 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, tmaimon77@gmail.com, linux-aspeed@lists.ozlabs.org, linux-iio@vger.kernel.org, konrad.dybcio@somainline.org, alsa-devel@alsa-project.org, tali.perry1@gmail.com, ldewangan@nvidia.com, linux-mtd@lists.infradead.org, alim.akhtar@samsung.com, linux-riscv@lists.infradead.org, linux-spi@vger.kernel.org, festevam@gmail.com, linux-stm32@st-md-mailman.stormreply.com, jbrunet@baylibre.com, git@amd.com, linux-samsung-soc@vger.kernel.org, yogeshgaur.83@gmail.com, openbmc@lists.ozlabs.org, jonathanh@nvidia.com, amit.kumar-mahapatra@amd.com, yuenn@google.com, bcm-kernel-feedback-list@broadcom.com, linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-imx@nxp.com, amitrkcian2002@gmail.com, Michael.Hennerich@analog.com, martin.blumenstingl@googlemail.com, linux-arm-msm@vger.kernel.org, radu_nicolae.pirea@upb.ro, linuxppc-dev@lists.ozlabs.org, lars@metafoo.de, linux-mediatek@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-tegra@vger .kernel.org, linux-amlogic@lists.infradead.org, michal.simek@amd.com, linux-arm-kernel@lists.infradead.org, avifishman70@gmail.com, venture@google.com, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, nicolas.ferre@microchip.com, fancer.lancer@gmail.com, linux-kernel@vger.kernel.org, michael@walle.cc, thierry.reding@gmail.com, palmer@dabbelt.com, kernel@pengutronix.de, netdev@vger.kernel.org, patches@opensource.cirrus.com, linux-wpan@vger.kernel.org, claudiu.beznea@microchip.com Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select & spi->cs_gpiod and replaced all spi->chip_select and spi->cs_gpiod references with get or set API calls. While adding multi-cs support in further patches the chip_select & cs_gpiod members of the spi_device structure would be converted to arrays & the "idx" parameter of the APIs would be used as array index i.e., spi->chip_select[idx] & spi->cs_gpiod[idx] respectively. Signed-off-by: Amit Kumar Mahapatra --- sound/pci/hda/cs35l41_hda_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/cs35l41_hda_spi.c b/sound/pci/hda/cs35l41_hda_spi.c index 71979cfb4d7e..eb287aa5f782 100644 --- a/sound/pci/hda/cs35l41_hda_spi.c +++ b/sound/pci/hda/cs35l41_hda_spi.c @@ -25,7 +25,7 @@ static int cs35l41_hda_spi_probe(struct spi_device *spi) else return -ENODEV; - return cs35l41_hda_probe(&spi->dev, device_name, spi->chip_select, spi->irq, + return cs35l41_hda_probe(&spi->dev, device_name, spi_get_chipselect(spi, 0), spi->irq, devm_regmap_init_spi(spi, &cs35l41_regmap_spi)); }