From: Serge Semin <fancer.lancer@gmail.com>
To: Serge Semin <fancer.lancer@gmail.com>,
Mark Brown <broonie@kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Andy Shevchenko <andy@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH RESEND v4 3/4] spi: dw: Convert dw_spi::num_cs to u32
Date: Wed, 24 Apr 2024 18:06:44 +0300 [thread overview]
Message-ID: <20240424150657.9678-4-fancer.lancer@gmail.com> (raw)
In-Reply-To: <20240424150657.9678-1-fancer.lancer@gmail.com>
Number of native chip-select lines is either retrieved from the "num-cs"
DT-property or auto-detected in the generic DW APB/AHB SSI probe method.
In the former case the property is supposed to be of the "u32" size.
Convert the field type to being u32 then to be able to drop the temporary
variable afterwards.
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
---
Changelog v2:
- Just added.
---
drivers/spi/spi-dw.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h
index 6cafeee8ee2a..fc267c6437ae 100644
--- a/drivers/spi/spi-dw.h
+++ b/drivers/spi/spi-dw.h
@@ -164,8 +164,8 @@ struct dw_spi {
u32 max_freq; /* max bus freq supported */
u32 reg_io_width; /* DR I/O width in bytes */
+ u32 num_cs; /* chip select lines */
u16 bus_num;
- u16 num_cs; /* supported slave numbers */
void (*set_cs)(struct spi_device *spi, bool enable);
/* Current message transfer state info */
--
2.43.0
next prev parent reply other threads:[~2024-04-24 15:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 15:06 [PATCH RESEND v4 0/4] spi: dw: Auto-detect number of native CS Serge Semin
2024-04-24 15:06 ` [PATCH RESEND v4 1/4] spi: dw: Convert to using BITS_TO_BYTES() macro Serge Semin
2024-04-24 15:06 ` [PATCH RESEND v4 2/4] spi: dw: Add a number of native CS auto-detection Serge Semin
2024-04-24 15:06 ` Serge Semin [this message]
2024-04-24 15:06 ` [PATCH RESEND v4 4/4] spi: dw: Drop default number of CS setting Serge Semin
2024-05-06 14:59 ` [PATCH RESEND v4 0/4] spi: dw: Auto-detect number of native CS 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=20240424150657.9678-4-fancer.lancer@gmail.com \
--to=fancer.lancer@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=broonie@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.