[RFC PATCH 1/6] spi: Extend the core to ease integration of SPI memory controllers
Mark Brown
broonie at kernel.org
Mon Feb 19 06:00:03 PST 2018
On Tue, Feb 06, 2018 at 12:21:15AM +0100, Boris Brezillon wrote:
> + /*
> + * The controller can implement only the high-level SPI-memory like
> + * operations if it does not support regular SPI transfers.
> + */
> + if (ctlr->mem_ops) {
> + if (!ctlr->mem_ops->supports_op ||
> + !ctlr->mem_ops->exec_op)
> + return -EINVAL;
> + } else if (!ctlr->transfer && !ctlr->transfer_one &&
> + !ctlr->transfer_one_message) {
> + return -EINVAL;
> + }
BTW your comment isn't describing what the code does - the comment says
that having the memory operations means the driver can't be a regular
SPI controller while the code does not do that and only checks that if a
driver has memory ops it implements two required ones. Indeed the
existing drivers that are updated to the new API continue to implement
normal SPI operations.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20180219/10dfe5d9/attachment.sig>
More information about the linux-mtd
mailing list