From: Patrice CHOTARD <patrice.chotard@foss.st.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mark Brown <broonie@kernel.org>, <linux-spi@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>
Subject: Re: [PATCH v1 1/2] spi: stm32-qspi: Replace of_gpio_named_count() by gpiod_count()
Date: Wed, 31 Aug 2022 09:22:08 +0200 [thread overview]
Message-ID: <33d2da82-1e8a-c5dd-7f75-2454714357e6@foss.st.com> (raw)
In-Reply-To: <20220830182821.47919-1-andriy.shevchenko@linux.intel.com>
Hi Andy
On 8/30/22 20:28, Andy Shevchenko wrote:
> As a preparation to unexport of_gpio_named_count(), convert the
> driver to use gpiod_count() instead.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/spi/spi-stm32-qspi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c
> index 227f450aa5f0..5858f5f9c758 100644
> --- a/drivers/spi/spi-stm32-qspi.c
> +++ b/drivers/spi/spi-stm32-qspi.c
> @@ -656,7 +656,7 @@ static int stm32_qspi_setup(struct spi_device *spi)
> mode = spi->mode & (SPI_TX_OCTAL | SPI_RX_OCTAL);
> if ((mode == SPI_TX_OCTAL || mode == SPI_RX_OCTAL) ||
> ((mode == (SPI_TX_OCTAL | SPI_RX_OCTAL)) &&
> - of_gpio_named_count(qspi->dev->of_node, "cs-gpios") == -ENOENT)) {
> + gpiod_count(qspi->dev, "cs") == -ENOENT)) {
> dev_err(qspi->dev, "spi-rx-bus-width\\/spi-tx-bus-width\\/cs-gpios\n");
> dev_err(qspi->dev, "configuration not supported\n");
>
> @@ -681,7 +681,7 @@ static int stm32_qspi_setup(struct spi_device *spi)
> * are both set in spi->mode and "cs-gpios" properties is found in DT
> */
> if (((spi->mode & (SPI_TX_OCTAL | SPI_RX_OCTAL)) == (SPI_TX_OCTAL | SPI_RX_OCTAL)) &&
> - of_gpio_named_count(qspi->dev->of_node, "cs-gpios")) {
> + gpiod_count(qspi->dev, "cs")) {
> qspi->cr_reg |= CR_DFM;
> dev_dbg(qspi->dev, "Dual flash mode enable");
> }
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Thanks
Patrice
next prev parent reply other threads:[~2022-08-31 7:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 18:28 [PATCH v1 1/2] spi: stm32-qspi: Replace of_gpio_named_count() by gpiod_count() Andy Shevchenko
2022-08-30 18:28 ` [PATCH v1 2/2] spi: stm32-qspi: Refactor dual flash mode enable check in ->setup() Andy Shevchenko
2022-08-31 8:03 ` Patrice CHOTARD
2022-08-31 7:22 ` Patrice CHOTARD [this message]
2022-08-31 13:04 ` [PATCH v1 1/2] spi: stm32-qspi: Replace of_gpio_named_count() by gpiod_count() 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=33d2da82-1e8a-c5dd-7f75-2454714357e6@foss.st.com \
--to=patrice.chotard@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).