]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw: Discard redundant DW SSI Frame Formats enumeration
authorBaikal Electronics <support@baikalelectronics.ru>
Mon, 15 Nov 2021 18:19:12 +0000 (21:19 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 16 Nov 2021 14:30:04 +0000 (14:30 +0000)
commit08bd9e2c094d27a2bf1f5c1b302d1df9f6b8e92c
tree5237b2179122a0ee3fb53d439198de4fa03a8ebf
parent0922c27f9e393127124f8ea3574daecd2ffa7c10
spi: dw: Discard redundant DW SSI Frame Formats enumeration

The dw_ssi_type enumeration describes the SPI frame formats the controller
supports, like Motorola SPI, Texas Instruments SSP and National
Semiconductors Microwire, that is the serial protocol utilized for the
SPI-transfers. Depending on the DW SSI IP-core configuration the protocol
could be either fixed or selectable. If it is changebale the protocol can
be selected by means of the CTRL0.FRF field, which possible values encoded
by the dw_ssi_type enumeration.  Aside with the denoted enum the field
values are also described by a set of SPI_FRF_{SPI,SSP,MICROWIRE} macros.
Thus currently the DW SPI driver has got two entities describing the same
data. Let's get rid of the enumeration one then, since first it hasn't
been used as enumeration-type but merely as a parametrized values set and
second that would unify the macro-based CSR read/write interface of the
driver. While at it convert the macro names to be more descriptive about
the protocols they represent.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20211115181917.7521-3-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw-core.c
drivers/spi/spi-dw.h