Files
android_kernel_xiaomi_sm8450/drivers/spi
Boris Brezillon b5932f5c68 spi: Make support for regular transfers optional when ->mem_ops != NULL
Some SPI/QuadSPI controllers only expose a high-level SPI memory
interface, thus preventing any regular SPI transfers from being done.

In that case, SPI controller drivers can leave all ->transfer_xxx()
hooks empty and only implement the spi_mem_ops interface.

Adjust the core to allow such situations:
- extend spi_controller_check_ops() to accept situations where all
  ->transfer_xxx() pointers are NULL only if ->mem_ops != NULL
- make sure we do not initialize the SPI message queue if
  ctlr->transfer_one and ctlr->transfer_one_message are missing
- return -ENOTSUPP if someone tries to do a regular SPI transfer on
  a controller that does not support it

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@exceet.de>
Tested-by: Frieder Schrempf <frieder.schrempf@exceet.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11 11:33:15 +09:00
..
2017-07-17 12:09:38 +01:00
2018-04-20 17:53:20 +01:00
2016-07-07 11:44:43 +02:00
2018-05-03 10:27:21 +09:00
2015-12-07 20:09:09 +00:00
2018-05-03 10:27:43 +09:00
2017-08-23 17:12:05 +01:00
2017-01-23 18:09:37 +00:00
2018-04-19 18:17:46 +01:00
2017-08-10 15:50:23 +01:00
2017-05-26 12:41:07 +01:00