]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw: Add DW SPI controller config structure
authorBaikal Electronics <support@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)
commit1e42b622f89bd3ae68563df40014d605c9f8800a
treef444c47f47986b38c502364e597585df488d3797
parent15f5677db3a1107151078b5b3ed3db329db5b61a
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