From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92B2DC61D97 for ; Mon, 23 Jan 2023 17:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s+DHJwLNz910+uQuaUJfqhORqd5YfnZL2Mz+KieyPpA=; b=BhqC3FBWQ3eEdO TFu8nRZXzfQcJQEsJJJO774Tv31lCYJnAFB7aWoBVQGAoXcje9fTedOx3FHno7mvK6LVdCq/NRLHA OBf4ksyIRL8JUesLNtQPwY32DnCr3yXzvs6oOAGQ/FtnAVfHFHoEo1sOzL64euVtlJFDX1OrcNTYZ RQw9wfLVHpCGZ9PaXAur7ivjgCym22U5pNEDZtps4khZvdsUl6Ih/OydnJOtwt9gUlxe20WnC/cwr Gtv9WXXw0B8ZyL7/uDmwVdW7LLjW2q+wOsAawmzrRmdAfVdZ1yJ6uPXwA+a6PTHq5vTMUG+KvGUmk i7sy+rO1R41wPXnjPDww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pK0UW-000oUJ-84; Mon, 23 Jan 2023 17:20:20 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJGte-00EAD7-DB; Sat, 21 Jan 2023 16:39:15 +0000 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 dfw.source.kernel.org (Postfix) with ESMTPS id 5626360B47; Sat, 21 Jan 2023 16:39:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FBD0C433D2; Sat, 21 Jan 2023 16:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674319150; bh=gT/5AvVpeDrgKjkh47OXtzrBPwHm9WVXPk88PeHkYdg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=T2T2vnT1Xs4tW5V/oTrCVF/YscJHiNq+7HTjvmQMO07kIVdALzUWUY/Lg7jgN8oeV wDH/jrinV14zyuMq2EWtvqw0MJqCVYQkQmSM97I02rGKmkJT8mWnP+XySroZ4rplWG RlAswjzAZLSIUe5xREEi1xk7mpGRJ+el+yXQps4AW3OLVqJhTAobryzkTKQ7IcmeFR gz9n7eY4kKn03iiqGBkjRAI/u36bgFn5jBskRGSmm4cNBL/uaGM08TtLTQYXpHtqxx meoZpovFIIHToxzFIsTk068dsFlMtc5YJ3ropDVVqr5LoNdkRAl4Bqac9L/I3U7BVM lonUWh/lOpEIw== Date: Sat, 21 Jan 2023 16:52:35 +0000 From: Jonathan Cameron To: Amit Kumar Mahapatra Cc: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v2 04/13] iio: imu: Replace all spi->chip_select and spi->cs_gpiod references with function call Message-ID: <20230121165235.13da9db2@jic23-huawei> In-Reply-To: <20230119185342.2093323-5-amit.kumar-mahapatra@amd.com> References: <20230119185342.2093323-1-amit.kumar-mahapatra@amd.com> <20230119185342.2093323-5-amit.kumar-mahapatra@amd.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.36; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230121_083914_569845_EC06A874 X-CRM114-Status: GOOD ( 19.36 ) X-Mailman-Approved-At: Mon, 23 Jan 2023 09:19:52 -0800 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, 20 Jan 2023 00:23:33 +0530 Amit Kumar Mahapatra wrote: > 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 Acked-by: Jonathan Cameron > --- > 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) { _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv