linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: core: don't try to OF populate DDC i2c buses
@ 2016-11-30 11:50 Lucas Stach
  2016-11-30 13:21 ` Uwe Kleine-König
  2016-11-30 13:54 ` Vladimir Zapolskiy
  0 siblings, 2 replies; 9+ messages in thread
From: Lucas Stach @ 2016-11-30 11:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, kernel, patchwork-lst

DDC buses are manually managed by their consumers to communicate
with the display. There is no need to try to populate OF childs.

This gets rid of the device create failed warning caused by the
core trying to populate a DDC bus below a OF device, which has
other childs nodes, that aren't i2c devices.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/i2c/i2c-core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 5ab67219f71e..fbf7aade2ca7 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1686,6 +1686,10 @@ static void of_i2c_register_devices(struct i2c_adapter *adap)
 	if (!adap->dev.of_node)
 		return;
 
+	/* DDC buses have no OF populated childs */
+	if (adap->class == I2C_CLASS_DDC)
+		return;
+
 	dev_dbg(&adap->dev, "of_i2c: walking child nodes\n");
 
 	bus = of_get_child_by_name(adap->dev.of_node, "i2c-bus");
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-01-13 10:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-30 11:50 [PATCH] i2c: core: don't try to OF populate DDC i2c buses Lucas Stach
2016-11-30 13:21 ` Uwe Kleine-König
2016-11-30 13:54 ` Vladimir Zapolskiy
2016-11-30 14:06   ` Lucas Stach
2016-11-30 20:18     ` Vladimir Zapolskiy
2016-12-01 10:07       ` Lucas Stach
2016-12-01 12:23         ` Vladimir Zapolskiy
2016-12-11 22:16           ` Wolfram Sang
2017-01-13 10:14             ` Lucas Stach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).