Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1462683rwb; Thu, 19 Jan 2023 10:58:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXtuRWuyeYCt7qDfXdnfTzZIy9Uep9PeGDZC1PAsuX9j+aSdpeiNegdq2Ox5mIVU/Gj7fDEZ X-Received: by 2002:a05:6a00:4c95:b0:58d:c617:8eb9 with SMTP id eb21-20020a056a004c9500b0058dc6178eb9mr11341306pfb.7.1674154688371; Thu, 19 Jan 2023 10:58:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674154688; cv=pass; d=google.com; s=arc-20160816; b=IjT7n75Z/pLs+4uCHd21M4ddss9vL+KpsPnywsntyAYJKLUZuOHOaUHWfB98dCgeRD z/+qBKnggISHpGQLUSZuaCH3k88Pj+6mgcyIkH/+lR3UCeiC2Zg4Fsdk2IwYgGuiUebU 1apNfWb5Is8fu/bmln3IUVjsx+9oOpq0ruI/Djoh7epRHwoJ+4HTaFu1nzSK4trM2L8J JuKcNQUgTbcU4gabija+OpvqYFaI2EhsplnA8FyKFo14UrbD04rsYEwC0V5S5XUkqXYy ZzWS5Bf+Dk/a9bl6TGngQr/tiwLJjP5vFAPVZWroeE3EV+uQ7lZLPJZkNTJfd7WniZXR U6GA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wqZKbgzYxdsDVeEGIXO3Jh2fBndlNWmGKU99ycD+Bfo=; b=jb6lsF7qPQ5XOytrl8FL5Kxt65Ufl8SbakRgCs8no5BMvjdpWBetOzbN+Tt+3gx4g3 UvlOrNZKjcO/dN/KYds3VG5p2YtCWtDQHSbyJi4pLlW+QoKLGvVtIB4hg5tCTHbcFLPX ADF3cLKt1rdqLt27FCO7+9JOyobMq/kfekLSaPzAb2jXTQSvjsqI3ng+qKgmp5V67NbD oAEUcM/8l8Iej2K+k7yilKsBkptq03e7z7GusiQYAGk3nnejrZiGXW2y1uZyQ1vQRY3r JwzYw7q45z2NkjkHZxDQ0vZLSoptVaDqEkB/T6BBiOeCieKckgGpaKYNijLwuBql51YR jv0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=uB84dKH8; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i188-20020a6254c5000000b0058da0539819si14309498pfb.162.2023.01.19.10.58.00; Thu, 19 Jan 2023 10:58:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=@amd.com header.s=selector1 header.b=uB84dKH8; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230403AbjASS5W (ORCPT + 63 others); Thu, 19 Jan 2023 13:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230413AbjASS4q (ORCPT ); Thu, 19 Jan 2023 13:56:46 -0500 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2052.outbound.protection.outlook.com [40.107.243.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82AE594324; Thu, 19 Jan 2023 10:56:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JsCyp2it8BcFEUw7H2BwB/us1Jm2r61LoqinHxUUgS4XJ5Px1eUSEhjS0AVAf1dZBH3W1ok2NqGrFMmYz1BVRBKUc25J7On59DsQcvDWM0XHn6SifbeyYbSPe/p0c9gOfG23uRqvCnTgThew+RxYWf3Kpj7uJoXm6RJVFl7h7+EUNpfOKx88aYIFoMu+wOQRlmkLbHoCrPgV+1NSfRCyiCmZ5eZI+PGaxp3Kflzz3cH7n7ptykJW/4i2LNFd7OrYogT/et9eav1/I5Z5IZhWberJn/6dJLNKcWnDtdqcH24vLfm2r4KfQ5wt6rkbdmjMhzBLdEpjkoiEpEBvEBPYNg== 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=wqZKbgzYxdsDVeEGIXO3Jh2fBndlNWmGKU99ycD+Bfo=; b=fDHgw1Z7ygzTUtNbw/TUrAtyaKMZIC/GuyfYG3EFcgCovH90GWrjpGuMHgivF2zYqw29zvQ4ucDXJBcBHCTE2/lnpsuZFNvzLduK7f47bWef97wROAQuI7bw+srpfs2xx5iF4rCPqi7OO9XyIjcm41OZnY+tkwYEHfyr85JPKEUYhDaUiwgT1OdAlpu4o7EpCjApO3EKSpKv1e9lkiQdXas6++7rG8fQpkhN7Esmyj8mCkM5ansXrZEQ5ju8bgNSDjdcc60bkw0En/QYbFucyfBhJCjc1CNIDXvXY3U7QA/l2bSSuuVY7bW/6gpkwyAnHha9ZvHgMmfkSkpJpsxHiA== 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=wqZKbgzYxdsDVeEGIXO3Jh2fBndlNWmGKU99ycD+Bfo=; b=uB84dKH8Y3ZSyK6D3lzJASCU45L13R75hTmgLZ+F8UgkgEN92fFiHEQFqzyao1Bh9BfP4vcvxBLJ9FeCxsyUmnEyo8+FdkP5AnmdHDfW+INMRrsHg+BVmj/Blnq71KeoNmbxRJ17XbUbZDJz2N417Ib7ObIKTxOfZAznuJYWZl4= Received: from BY5PR03CA0007.namprd03.prod.outlook.com (2603:10b6:a03:1e0::17) by SJ0PR12MB5453.namprd12.prod.outlook.com (2603:10b6:a03:37f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Thu, 19 Jan 2023 18:55:56 +0000 Received: from CO1PEPF00001A61.namprd05.prod.outlook.com (2603:10b6:a03:1e0:cafe::55) by BY5PR03CA0007.outlook.office365.com (2603:10b6:a03:1e0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.26 via Frontend Transport; Thu, 19 Jan 2023 18:55:56 +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 CO1PEPF00001A61.mail.protection.outlook.com (10.167.241.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6002.11 via Frontend Transport; Thu, 19 Jan 2023 18:55:55 +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; Thu, 19 Jan 2023 12:55:53 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) 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; Thu, 19 Jan 2023 10:55:52 -0800 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Thu, 19 Jan 2023 12:55:27 -0600 From: Amit Kumar Mahapatra To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v2 04/13] iio: imu: Replace all spi->chip_select and spi->cs_gpiod references with function call Date: Fri, 20 Jan 2023 00:23:33 +0530 Message-ID: <20230119185342.2093323-5-amit.kumar-mahapatra@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230119185342.2093323-1-amit.kumar-mahapatra@amd.com> References: <20230119185342.2093323-1-amit.kumar-mahapatra@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF00001A61:EE_|SJ0PR12MB5453:EE_ X-MS-Office365-Filtering-Correlation-Id: 49a2b5d5-3d48-496c-33a1-08dafa4ecbe8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WBA63KZnrxfvEplOF6JWZyk/dCvSFV6ENFZdkUzOsGSPpp4Uxf6sHv4syWeZUdhaDjMZNinPTweaylaukdzfG3zev+PVv/72U0ILn/Ir8wm+U+w9chS7H8uWv/f6jQzOm36r0sviyazZ2AizZaHTA5hjysjvFqSjrPvX2W8QKoJDy6pAYyxvTUjbgFDrmTg0/7kd5wLnH07sjuoVlgQmMPzye5uCsdRsuyy0swWf1j9gufBzMZmHNcJTcZmKXgZWf70jQgq7l2daGqg+2W06ewxV0lSO2hDTPoXxEOgatjnULspzZjazWqJa93epZD+mv3D8JjH0+o1dmZRlAqfoJ2VEeSqzrpP77gTUdQsTLvVsHyo7Pmri3djXithfDVRO/pTlHz+FTnCO+FlVV/UXnwdfoI5l/l++mQu9D+9Xww9ne3vBqILuoxFL+FM6f650fSf7KG/UL7/eqYy3WQuzZgZvT7OI+vljs97MmCVMmQRQ9IPNk4CcUwL7aF9u+5Djn0cAfjHmKsTkAaITLOH0DECpI//iNoX1UHhn4LUAc97HTqiRhO3Su0bKfk5d2hss+U9HSKswBV/sXdD7sWrM5y74vrBpl/vz4bdc6VW66Cu4Q6HgE7mQrE2J3eF080MNTZ6CRb794rktS33RAtitBrsJfHfJx0L5tiBS/JjERhJ+wSB5CP5l1AzDhGyCF/7M11JSABullrDN5mUBoPCbchoQ0vnIDZNB5oQFm7DnQxzer/dy7NMo8/c2yP96z/JmQpCY6Jcdv2+/kRmmSw4a6Jvc2elKEs0kAid1oxH3F8y2EU81vT3NFo0bFpl1N6ngCcPMMJazI/FESrz6aKgFuOp7Z5ObdBBA+3rl1Z3d4Ts= 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:(13230022)(4636009)(39860400002)(136003)(346002)(396003)(376002)(451199015)(46966006)(36840700001)(40470700004)(86362001)(40460700003)(36756003)(6666004)(478600001)(8936002)(316002)(40480700001)(36860700001)(7276002)(7336002)(7366002)(82740400003)(70206006)(70586007)(7416002)(7406005)(5660300002)(4326008)(8676002)(41300700001)(186003)(921005)(356005)(26005)(1191002)(82310400005)(2906002)(1076003)(81166007)(83380400001)(336012)(54906003)(110136005)(426003)(2616005)(47076005)(41080700001)(2101003)(84006005)(83996005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 18:55:55.9232 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49a2b5d5-3d48-496c-33a1-08dafa4ecbe8 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: CO1PEPF00001A61.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5453 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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-wireless@vger.kernel.org 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 --- drivers/iio/imu/adis16400.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/imu/adis16400.c b/drivers/iio/imu/adis16400.c index c02fc35dceb4..3eda32e12a53 100644 --- a/drivers/iio/imu/adis16400.c +++ b/drivers/iio/imu/adis16400.c @@ -466,7 +466,7 @@ static int adis16400_initial_setup(struct iio_dev *indio_dev) dev_info(&indio_dev->dev, "%s: prod_id 0x%04x at CS%d (irq %d)\n", indio_dev->name, prod_id, - st->adis.spi->chip_select, st->adis.spi->irq); + spi_get_chipselect(st->adis.spi, 0), st->adis.spi->irq); } /* use high spi speed if possible */ if (st->variant->flags & ADIS16400_HAS_SLOW_MODE) { -- 2.17.1