diff mbox series

[RFC,4/4] spi: rpc-if: Add set_iofv() callback

Message ID 20231108171149.258656-5-biju.das.jz@bp.renesas.com
State New
Headers show
Series Add set_iofv() callback | expand

Commit Message

Biju Das Nov. 8, 2023, 5:11 p.m. UTC
Add set_iofv() callback for configuring IO fixed values to control
the pin state.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/spi/spi-rpc-if.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/drivers/spi/spi-rpc-if.c b/drivers/spi/spi-rpc-if.c
index e11146932828..8b5c41de99af 100644
--- a/drivers/spi/spi-rpc-if.c
+++ b/drivers/spi/spi-rpc-if.c
@@ -75,6 +75,14 @@  static bool rpcif_spi_mem_supports_op(struct spi_mem *mem,
 	return true;
 }
 
+static int rpcif_spi_mem_set_iofv(struct spi_mem *mem, const u32 val)
+{
+	struct rpcif *rpc =
+		spi_controller_get_devdata(mem->spi->controller);
+
+	return rpcif_set_iofv(rpc->dev, val);
+}
+
 static ssize_t rpcif_spi_mem_dirmap_read(struct spi_mem_dirmap_desc *desc,
 					 u64 offs, size_t len, void *buf)
 {
@@ -121,6 +129,7 @@  static int rpcif_spi_mem_exec_op(struct spi_mem *mem,
 }
 
 static const struct spi_controller_mem_ops rpcif_spi_mem_ops = {
+	.set_iofv	= rpcif_spi_mem_set_iofv,
 	.supports_op	= rpcif_spi_mem_supports_op,
 	.exec_op	= rpcif_spi_mem_exec_op,
 	.dirmap_create	= rpcif_spi_mem_dirmap_create,