[PATCH v8 05/14] spi: mxic: Provide a capability structure
Miquel Raynal
miquel.raynal at bootlin.com
Tue Dec 21 09:48:35 PST 2021
This controller has DTR support, so advertize it with a capability now
that the spi_controller_mem_ops 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 at bootlin.com>
---
drivers/spi/spi-mxic.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c
index 45889947afed..e137b1ec85d4 100644
--- a/drivers/spi/spi-mxic.c
+++ b/drivers/spi/spi-mxic.c
@@ -443,9 +443,14 @@ static int mxic_spi_mem_exec_op(struct spi_mem *mem,
return ret;
}
+static const struct spi_controller_mem_caps mxic_spi_mem_caps = {
+ .dtr = true,
+};
+
static const struct spi_controller_mem_ops mxic_spi_mem_ops = {
.supports_op = mxic_spi_mem_supports_op,
.exec_op = mxic_spi_mem_exec_op,
+ .caps = &mxic_spi_mem_caps,
};
static void mxic_spi_set_cs(struct spi_device *spi, bool lvl)
--
2.27.0
More information about the linux-mtd
mailing list