diff options
author | Boris Brezillon <[email protected]> | 2018-04-26 18:18:15 +0200 |
---|---|---|
committer | Mark Brown <[email protected]> | 2018-05-11 11:33:15 +0900 |
commit | b5932f5c68e5fbe74fb7a27b4d0faf919e1e1642 (patch) | |
tree | ca5457a85c7597e715a21c9446c4aee24c0a4174 /lib/test-string_helpers.c | |
parent | c36ff266dc82f4ae797a6f3513c6ffa344f7f1c7 (diff) |
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 <[email protected]>
Reviewed-by: Frieder Schrempf <[email protected]>
Tested-by: Frieder Schrempf <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions