spi: spi-mem: Introduce a capability structure
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 27 Jan 2022 09:17:56 +0000 (10:17 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 10 Feb 2022 08:32:29 +0000 (09:32 +0100)
commit4a3cc7fb6e63bcfdedec25364738f1493345bd20
treec25241f3e2c4e9dcc6ad90ad16ba57359939dfbe
parent70e038f89b467995708207fb57bbf46aec32dc2c
spi: spi-mem: Introduce a capability structure

Create a spi_controller_mem_caps structure and put it within the
spi_controller structure close to the spi_controller_mem_ops
strucure. So far the only field in this structure is the support for dtr
operations, but soon we will add another parameter.

Also create a helper to parse the capabilities and check if the
requested capability has been set or not.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/linux-mtd/20220127091808.1043392-2-miquel.raynal@bootlin.com
include/linux/spi/spi-mem.h
include/linux/spi/spi.h