From: Heiko Schocher <hs@denx.de>
To: linuxppc-embedded@ozlabs.org
Subject: I2C Warning on a 405GPr based board with actual 2.6.20-rc5 Kernel
Date: Wed, 17 Jan 2007 16:10:09 +0100 [thread overview]
Message-ID: <1169046609.5543.73.camel@Apollo> (raw)
Hello,
I have a 405Gpr based Board and use the I2C Bus. Today I tried the Linux
Kernel version 2.6.20-rc5, and get the following Warning:
i2c /dev entries driver
IBM IIC driver v2.1
**WARNING** I2C adapter driver [IBM IIC] forgot to specify physical
device; fix it!
ibm-iic0: using standard (100 kHz) mode
Hmm.. I solved it with the following patch, but I don t know if this is
the right way.
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c
b/drivers/i2c/busses/i2c-ibm_iic.c
index 1898e99..140d7fe 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -35,6 +35,7 @@
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/interrupt.h>
+#include <linux/platform_device.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <linux/i2c.h>
@@ -737,6 +738,9 @@ static int __devinit iic_probe(struct ocp_device
*ocp){
adap->timeout = 1;
adap->retries = 1;
+ if (adap->dev.parent == NULL) {
+ adap->dev.parent = &platform_bus;
+ }
if ((ret = i2c_add_adapter(adap)) != 0){
printk(KERN_CRIT "ibm-iic%d: failed to register i2c adapter\n",
dev->idx);
thanks
Heiko
reply other threads:[~2007-01-17 15:27 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=1169046609.5543.73.camel@Apollo \
--to=hs@denx.de \
--cc=linuxppc-embedded@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.