spi: dw: Auto-detect number of native CS
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 1 replyIn review
- v34 patches 0 repliesSuperseded
- v24 patches 1 replySuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 3 patches | 6 replies | Superseded |
Changes in v4 from the cover letter
- Just resend.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | spi: dw: Convert to using BITS_TO_BYTES() macrodrivers/ | +2 | 0 replies | |
| 2/4 | spi: dw: Add a number of native CS auto-detectiondrivers/ | +14 | 0 replies | |
| 3/4 | spi: dw: Convert dw_spi::num_cs to u32drivers/ | +1 | 0 replies | |
| 4/4 | spi: dw: Drop default number of CS settingdrivers/ | +2 | 0 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Andy Shevchenko |
|---|---|
| Series | R-b |
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH RESEND v4 0/4] spi: dw: Auto-detect number of native CS
The main goal of the short series is to provide a procedure implementing the auto-detection of the number of native Chip-Select signals supported by the controller. The suggested algorithm is straightforward. It relies on the fact that the SER register writable flags reflects the actual number of available native chip-select signals. So the DW APB/AHB SSI driver now tests the SER register for having the writable bits, calculates the number of CS signals based on the number of set flags and then initializes the num_cs private data field based on that, which then will be passed to the SPI-core subsystem indicating the number of supported hardware chip-selects. The implemented procedure will be useful for the DW SSI device nodes not having the explicitly set "num-cs" property. In case if the property is specified it will be utilized instead of the auto-detection procedure.
Besides of that a small cleanup patch is introduced in the head of the series. It converts the driver to using the BITS_TO_BYTES() macro instead of the hard-coded DIV_ROUND_UP()-based calculation of the number of bytes-per-transfer-word.
Changelog v2:
- Add a new patch:
[PATCH v2 3/4] spi: dw: Convert dw_spi::num_cs to u32
- Fix some spelling notes (@Andy).
Changelog v3:
- Add Andy' Rb tag.
- Rebase onto the kernel v6.9 and resubmit.
Changelog v4:
- Just resend.
Serge Semin (4):
spi: dw: Convert to using BITS_TO_BYTES() macro
spi: dw: Add a number of native CS auto-detection
spi: dw: Convert dw_spi::num_cs to u32
spi: dw: Drop default number of CS setting
drivers/spi/spi-dw-core.c | 20 ++++++++++++++++---- drivers/spi/spi-dw-mmio.c | 8 ++------ drivers/spi/spi-dw.h | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0