Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2395614rwb; Fri, 20 Jan 2023 02:18:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXuaY5GEP5BNzbmg7+HK2o47dlZnAfhxgcWgv8XYoU9oEZcY0HmyHHMm311iRFnsRRWV+nDU X-Received: by 2002:aa7:8a50:0:b0:587:d491:995f with SMTP id n16-20020aa78a50000000b00587d491995fmr14579621pfa.20.1674209901562; Fri, 20 Jan 2023 02:18:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674209901; cv=none; d=google.com; s=arc-20160816; b=gfwoHrnuGY+heqUhZFAy6QFGe3eR5mOkFKbqUPhonn+1ZVifY0nCa2v04dzZ/cqyvz ra245heZVMXqA9iOHuFyid508DAnLAdTWYTytTo4jsTB08KHFZRdhzphOgWgHCyj8HHI 4yDaGSmAqdnQ2WmAlP6U+kuWkFdWcYfnKuf00dtGVnW9AHP1vo9MFImZDw0FX4iC+JI8 h5u0KRLjA4pNmkwWQony7xvpjaapOg0nOi3sHXW43Rf6ZU9kL/t53woLXKkQv4OdVZTR iXo97jk8KA5CVvIWrsGIF7AIr9oY9Y6R/ewpjFLJr0J2z001bm0sjq2/qoCSLHjBRo1O xk1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nIo6iA4Wvs8yw9iN/P+LGoynItZXrtSH15PjB+P4Xok=; b=TlGwlpTk2vn42drlDybTkjMn4JydFGgAK8OEfcDpyjh7GA3ZKHwNzXytaQYiZ4e+YN HFNjK4n4h3DVEHONkr+QrPhwgxorfQXRMQB1YmFazcC+V6XMCzSMQde5+uWJSyxr0p+x +fH0w7VZw78O5+LFSYJm4r5v1TPSFUDF6Lb28YX8tuUBkmvf/IsEPcrElZNAybShBqUB biLpZbJF/dh1O8MayUkmZMZ2z9wz1IwxHY5SWsQb6i5BW8BDe2EIs5PAKiWG0rselcRJ CasQWGrKF5rtYOK3svdoRosZeFQjSXqAjEZqtQUarGjLAsbIwsNSssVLs/ihUJhS5+Mo wb7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rMYgPKw1; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a056a00231000b005825460a640si43697290pfh.366.2023.01.20.02.18.10; Fri, 20 Jan 2023 02:18:21 -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=@linuxfoundation.org header.s=korg header.b=rMYgPKw1; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229879AbjATKJy (ORCPT + 63 others); Fri, 20 Jan 2023 05:09:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjATKJw (ORCPT ); Fri, 20 Jan 2023 05:09:52 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 370148B326; Fri, 20 Jan 2023 02:09:48 -0800 (PST) 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 B9B2C61F09; Fri, 20 Jan 2023 10:09:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA804C433D2; Fri, 20 Jan 2023 10:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1674209387; bh=QQh8ShqbKc4vcCYjUJJI+sW3w3r+3sanu/vPZ2IyzTw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rMYgPKw1pGl3FwPpK4PFmTlmFnpTnyZ7ux/Z8gB+BTQu8ad2dbnHGdmqSUUh9QAo3 C+u0IUTCPhPJwzafpGLLSfvLo60WsvNwXWf3AIb1nv8SUA+shDrhHnhPjsEK+wxt8Q HF3ooQ8AjjaEe2zCmeFagpTzLf/Qp8lQOOmYtGYc= Date: Fri, 20 Jan 2023 11:09:43 +0100 From: Greg KH To: Amit Kumar Mahapatra Cc: broonie@kernel.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, jic23@kernel.org, tudor.ambarus@microchip.com, pratyush@kernel.org, sanju.mehta@amd.com, chin-ting_kuo@aspeedtech.com, clg@kaod.org, kdasu.kdev@gmail.com, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, eajames@linux.ibm.com, olteanv@gmail.com, han.xu@nxp.com, john.garry@huawei.com, shawnguo@kernel.org, s.hauer@pengutronix.de, narmstrong@baylibre.com, khilman@baylibre.com, matthias.bgg@gmail.com, haibo.chen@nxp.com, linus.walleij@linaro.org, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, agross@kernel.org, bjorn.andersson@linaro.org, heiko@sntech.de, krzysztof.kozlowski@linaro.org, andi@etezian.org, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, masahisa.kojima@linaro.org, jaswinder.singh@linaro.org, rostedt@goodmis.org, mingo@redhat.com, l.stelmach@samsung.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, alex.aring@gmail.com, stefan@datenfreihafen.org, kvalo@kernel.org, thierry.reding@gmail.com, jonathanh@nvidia.com, skomatineni@nvidia.com, sumit.semwal@linaro.org, christian.koenig@amd.com, j.neuschaefer@gmx.net, vireshk@kernel.org, rmfrfs@gmail.com, johan@kernel.org, elder@kernel.org, git@amd.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, joel@jms.id.au, andrew@aj.id.au, radu_nicolae.pirea@upb.ro, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@microchip.com, bcm-kernel-feedback-list@broadcom.com, fancer.lancer@gmail.com, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, avifishman70@gmail.com, tmaimon77@gmail.com, tali.perry1@gmail.com, venture@google.com, yuenn@google.com, benjaminfair@google.com, yogeshgaur.83@gmail.com, konrad.dybcio@somainline.org, alim.akhtar@samsung.com, ldewangan@nvidia.com, michal.simek@amd.com, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, netdev@vger.kernel.org, linux-wpan@vger.kernel.org, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, linux-mtd@lists.infradead.org, lars@metafoo.de, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, michael@walle.cc, palmer@dabbelt.com, linux-riscv@lists.infradead.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, amitrkcian2002@gmail.com Subject: Re: [PATCH v2 06/13] staging: Replace all spi->chip_select and spi->cs_gpiod references with function call Message-ID: References: <20230119185342.2093323-1-amit.kumar-mahapatra@amd.com> <20230119185342.2093323-7-amit.kumar-mahapatra@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230119185342.2093323-7-amit.kumar-mahapatra@amd.com> X-Spam-Status: No, score=-7.1 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-wireless@vger.kernel.org On Fri, Jan 20, 2023 at 12:23:35AM +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 Reviewed-by: Greg Kroah-Hartman