summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-geni-qcom.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-05-06 04:05:15 +0300
committerMark Brown <broonie@kernel.org>2024-05-06 04:05:15 +0300
commitaa9db105301dc595c07ae11b1469352b0223ce79 (patch)
treefe4c3028174188f0a6b2e885e4efafa5285918ce /drivers/spi/spi-geni-qcom.c
parentc24d340598ed535d3bb6f5e64c544cad4ab2b67b (diff)
parent98d75b9ef282f6b9bfa1ea06d8a0824e0edaea97 (diff)
downloadlinux-aa9db105301dc595c07ae11b1469352b0223ce79.tar.xz
spi: dw: Auto-detect number of native CS
Merge series from Serge Semin <fancer.lancer@gmail.com>: 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.
Diffstat (limited to 'drivers/spi/spi-geni-qcom.c')
0 files changed, 0 insertions, 0 deletions