[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240506225139.57647-6-kyarlagadda@nvidia.com>
Date: Tue, 7 May 2024 04:21:33 +0530
From: Krishna Yarlagadda <kyarlagadda@...dia.com>
To: <linux-tegra@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-doc@...r.kernel.org>, <linux-i2c@...r.kernel.org>,
<linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <thierry.reding@...il.com>, <jonathanh@...dia.com>, <robh@...nel.org>,
<krzk+dt@...nel.org>, <conor+dt@...nel.org>, <corbet@....net>,
<andi.shyti@...nel.org>, <wsa+renesas@...g-engineering.com>,
<ulf.hansson@...aro.org>, <adrian.hunter@...el.com>, <digetx@...il.com>,
<ldewangan@...dia.com>, <kyarlagadda@...dia.com>, <mkumard@...dia.com>
Subject: [RFC PATCH 05/11] i2c: core: Avoid config node enumeration
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@...dia.com>
---
drivers/i2c/i2c-core-of.c | 3 +++
1 file changed, 3 insertions(+)
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;
--
2.43.2
Powered by blists - more mailing lists