summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2022-01-27 10:17:59 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2022-02-10 09:32:30 +0100
commit0e450c7ce7d170a78adaeaa9a430e4184f191c15 (patch)
tree100c1c92dc67e0dff1ef324ee15da50f1a8bafac /drivers/spi
parenta9be454927de3b6df8ca4cbd88e019e52b73d4b4 (diff)
spi: mxic: Provide a capability structure
This controller has DTR support, so advertize it with a capability now that the spi-controller structure contains this new field. This will later be used by the core to discriminate whether an operation is supported or not, in a more generic way than having different helpers. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.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-5-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-mxic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c
index 45889947afed..9952fcdf3627 100644
--- a/drivers/spi/spi-mxic.c
+++ b/drivers/spi/spi-mxic.c
@@ -448,6 +448,10 @@ static const struct spi_controller_mem_ops mxic_spi_mem_ops = {
.exec_op = mxic_spi_mem_exec_op,
};
+static const struct spi_controller_mem_caps mxic_spi_mem_caps = {
+ .dtr = true,
+};
+
static void mxic_spi_set_cs(struct spi_device *spi, bool lvl)
{
struct mxic_spi *mxic = spi_master_get_devdata(spi->master);
@@ -580,6 +584,7 @@ static int mxic_spi_probe(struct platform_device *pdev)
master->num_chipselect = 1;
master->mem_ops = &mxic_spi_mem_ops;
+ master->mem_caps = &mxic_spi_mem_caps;
master->set_cs = mxic_spi_set_cs;
master->transfer_one = mxic_spi_transfer_one;