spi: Generalize SPI "master" to "controller"
commit8caab75fd2c2a92667cbb1cd315720bede3feaa9
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 13 Jun 2017 11:23:52 +0000 (13 13:23 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 13 Jun 2017 17:51:11 +0000 (13 18:51 +0100)
tree8252d9a84e32698fe52f12dd6e94227555857668
parentc94085f587a77495eabb78a959bd591bee4ec89b
spi: Generalize SPI "master" to "controller"

Now struct spi_master is used for both SPI master and slave controllers,
it makes sense to rename it to struct spi_controller, and replace
"master" by "controller" where appropriate.

For now this conversion is done for SPI core infrastructure only.
Wrappers are provided for backwards compatibility, until all SPI drivers
have been converted.

Noteworthy details:
  - SPI_MASTER_GPIO_SS is retained, as it only makes sense for SPI
    master controllers,
  - spi_busnum_to_master() is retained, as it looks up masters only,
  - A new field spi_device.controller is added, but spi_device.master is
    retained for compatibility (both are always initialized by
    spi_alloc_device()),
  - spi_flash_read() is used by SPI masters only.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c
include/linux/spi/spi.h
include/trace/events/spi.h