]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw: Add DW SPI controller config structure
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Wed, 7 Oct 2020 23:54:56 +0000 (02:54 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 8 Oct 2020 22:00:10 +0000 (23:00 +0100)
commit3ff60c6b644e2002e062ed97825ead19e31c2769
treef444c47f47986b38c502364e597585df488d3797
parent2613d2bfbeacea2bc796a54219ba05385ae7436a
spi: dw: Add DW SPI controller config structure

DW APB SSI controller can be used by the two SPI core interfaces:
traditional SPI transfers and SPI memory operations. The controller needs
to be accordingly configured at runtime when the corresponding operations
are executed. In order to do that for the both interfaces from a single
function we introduce a new data wrapper for the transfer mode, data
width, number of data frames (for the automatic data transfer) and the bus
frequency. It will be used by the update_config() method to tune the DW
APB SSI up.

The update_config() method is made exported to be used not only by the DW
SPI core driver, but by the glue layer drivers too. This will be required
in a coming further commit.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20201007235511.4935-8-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw-core.c
drivers/spi/spi-dw.h