diff mbox series

[RFC,05/11] i2c: core: Avoid config node enumeration

Message ID 20240506225139.57647-6-kyarlagadda@nvidia.com
State New
Headers show
Series Introduce Tegra register config settings | expand

Commit Message

Krishna Yarlagadda May 6, 2024, 10:51 p.m. UTC
Add "config" as a common node to add device configuration settings and
other data. This child node should not be treated as a device.
Skip "config" child node during i2c device registration.

Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
---
 drivers/i2c/i2c-core-of.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c
index a6c407d36800..f50206c6c4d6 100644
--- a/drivers/i2c/i2c-core-of.c
+++ b/drivers/i2c/i2c-core-of.c
@@ -98,6 +98,9 @@  void of_i2c_register_devices(struct i2c_adapter *adap)
 		bus = of_node_get(adap->dev.of_node);
 
 	for_each_available_child_of_node(bus, node) {
+		if (!strcmp(node->name, "config"))
+			continue;
+
 		if (of_node_test_and_set_flag(node, OF_POPULATED))
 			continue;