[PATCH 2/2] i3c: dw: Select ibi ops for base platform driver

Aniket
2024-06-26T05:23:00Z

The AST2600 platform driver can always select the IBI ops.
We also need a way for the base platform driver to select
the ibi ops. Hence introduce this DT property which can be
used to register ibi ops from the base platform driver.

Signed-off-by: Aniket <aniketmaurya@google.com>
---
drivers/i3c/master/dw-i3c-master.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index 77a2a1c3fd1d..dff4f8e4e44e 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -1547,6 +1547,9 @@ static int dw_i3c_probe(struct platform_device *pdev)
if (!master)
return -ENOMEM;

+ if (of_property_read_bool(pdev->dev.of_node, "ibi-capable"))
+ master->ibi_capable = true;
+
return dw_i3c_common_probe(master, pdev);
}

--
2.45.2.741.gdbec12cfda-goog