[PATCH v5 12/13] spi: mxic: Use spi_mem_generic_supports_op()
Mark Brown
broonie at kernel.org
Wed Dec 15 11:19:11 PST 2021
On Wed, Dec 15, 2021 at 08:05:48PM +0100, Boris Brezillon wrote:
> There's also a second option that doesn't involve patching existing
> users: add a spi_mem_controller_caps to the spi_controller struct, and
> check this instance in your spi_mem_default_supports_op()
> implementation. Note that the buswidth check done in the generic
> helper is already based on caps exposed by the controller
> through spi_controller.mode_bits ({RX/TX}_{DUAL,QUAD,OCTAL} bits).
This approach is quite nice for things like this - having things as data
rather than code. The only issue is if any of the caps end up varying
by operation and we need different capabilities but that doesn't look
too likely here I think?
-------------- 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/20211215/1b7bd558/attachment.sig>
More information about the linux-mtd
mailing list