From: Lucas Stach <l.stach@pengutronix.de>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org, kernel@pengutronix.de,
patchwork-lst@pengutronix.de
Subject: [PATCH] i2c: core: don't try to OF populate DDC i2c buses
Date: Wed, 30 Nov 2016 12:50:05 +0100 [thread overview]
Message-ID: <20161130115005.11508-1-l.stach@pengutronix.de> (raw)
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
next reply other threads:[~2016-11-30 11:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 11:50 Lucas Stach [this message]
2016-11-30 13:21 ` [PATCH] i2c: core: don't try to OF populate DDC i2c buses 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161130115005.11508-1-l.stach@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-i2c@vger.kernel.org \
--cc=patchwork-lst@pengutronix.de \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).