From: Serge Semin <fancer.lancer@gmail.com>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
Cc: broonie@kernel.org, blarson@amd.com, git@amd.com,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
amitrkcian2002@gmail.com
Subject: Re: [PATCH] spi: dw: Replace spi->chip_select references with function calls
Date: Mon, 15 May 2023 16:35:53 +0300 [thread overview]
Message-ID: <20230515133553.46mownenmclcauec@mobilestation> (raw)
In-Reply-To: <20230515130343.63770-1-amit.kumar-mahapatra@amd.com>
On Mon, May 15, 2023 at 06:33:43PM +0530, Amit Kumar Mahapatra wrote:
> New set/get APIs for accessing spi->chip_select were introduced by
> 'commit 9e264f3f85a5 ("spi: Replace all spi->chip_select and spi->cs_gpiod
> references with function call")', but the 'commit 2c8606040a80 ("spi: dw:
> Add support for AMD Pensando Elba SoC")' uses the old interface by directly
> accessing spi->chip_select. So, replace all spi->chip_select references
> in the driver with new get/set APIs.
Indeed. I've absolutely missed that part. Thanks for the patch.
Acked-by: Serge Semin <fancer.lancer@gmail.com>
-Serge(y)
>
> Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
> ---
> BRANCH: for-next
> ---
> drivers/spi/spi-dw-mmio.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c
> index 5e6faa98aa85..5f2aee69c1c1 100644
> --- a/drivers/spi/spi-dw-mmio.c
> +++ b/drivers/spi/spi-dw-mmio.c
> @@ -264,17 +264,17 @@ static void dw_spi_elba_set_cs(struct spi_device *spi, bool enable)
> struct regmap *syscon = dwsmmio->priv;
> u8 cs;
>
> - cs = spi->chip_select;
> + cs = spi_get_chipselect(spi, 0);
> if (cs < 2)
> - dw_spi_elba_override_cs(syscon, spi->chip_select, enable);
> + dw_spi_elba_override_cs(syscon, spi_get_chipselect(spi, 0), enable);
>
> /*
> * The DW SPI controller needs a native CS bit selected to start
> * the serial engine.
> */
> - spi->chip_select = 0;
> + spi_set_chipselect(spi, 0, 0);
> dw_spi_set_cs(spi, enable);
> - spi->chip_select = cs;
> + spi_get_chipselect(spi, cs);
> }
>
> static int dw_spi_elba_init(struct platform_device *pdev,
> --
> 2.17.1
>
next prev parent reply other threads:[~2023-05-15 13:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 13:03 Amit Kumar Mahapatra
2023-05-15 13:35 ` Serge Semin [this message]
2023-05-16 11:37 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230515133553.46mownenmclcauec@mobilestation \
--to=fancer.lancer@gmail.com \
--cc=amit.kumar-mahapatra@amd.com \
--cc=amitrkcian2002@gmail.com \
--cc=blarson@amd.com \
--cc=broonie@kernel.org \
--cc=git@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®