From: Daniel Palmer <daniel@0x0f.com>
To: andi.shyti@kernel.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
Daniel Palmer <daniel@0x0f.com>
Subject: [PATCH] i2c-powermac: Silence modalias failure message on G5 powermacs
Date: Sat, 31 Oct 2026 07:33:18 +0900 [thread overview]
Message-ID: <20261030223318.1140883-1-daniel@0x0f.com> (raw)
G5 powermacs, and maybe others, have i2c nodes that have no compatible
and cause i2c_powermac_get_type() to print a warning like:
i2c i2c-3: i2c-powermac: modalias failure on /u3@0,f8000000/i2c@f8001000/cereal@1c0
The point of i2c_powermac_get_type() seems to be to override the modalias
that comes from the compatible so that normal i2c device drivers do not
bind to devices that are managed by other mac specific drivers (like the fan
control ones).
Since a device with no compatible shouldn't bind to any normal device the
warning doesn't need to be printed.
Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
drivers/i2c/busses/i2c-powermac.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index f99a2cc721a8..b37cf5b4ab10 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -299,6 +299,18 @@ static bool i2c_powermac_get_type(struct i2c_adapter *adap,
}
}
+ /*
+ * Some Apple device trees have i2c nodes with no compatible that can be
+ * ignored. Without this the cereal node on G5 macs prints the modalias
+ * warning below on every boot.
+ */
+ if (!of_property_present(node, "compatible")) {
+ dev_dbg(&adap->dev,
+ "i2c-powermac: no compatible property on %pOF, skipping\n",
+ node);
+ return false;
+ }
+
dev_err(&adap->dev, "i2c-powermac: modalias failure on %pOF\n", node);
return false;
}
--
2.55.0
reply other threads:[~2026-10-30 22:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261030223318.1140883-1-daniel@0x0f.com \
--to=daniel@0x0f.com \
--cc=andi.shyti@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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
all inboxes | Powered by JetHome®