From: Wolfram Sang <w.sang@pengutronix.de>
To: Gary Thomas <gary@mlbassoc.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
linux-i2c@vger.kernel.org
Subject: Re: Initcall ordering
Date: Sat, 24 Apr 2010 03:24:27 +0200 [thread overview]
Message-ID: <20100424012427.GA21255@pengutronix.de> (raw)
In-Reply-To: <4BD1C317.5000909@mlbassoc.com>
[-- Attachment #1.1: Type: text/plain, Size: 1551 bytes --]
Hi Gary,
(adding linux-i2c)
On Fri, Apr 23, 2010 at 09:56:07AM -0600, Gary Thomas wrote:
> I'm having trouble with the I2C devices on my 8347 platform.
> The problem is that I2C device probe() functions are only called
> once, as the I2C bus is being initialized (in this case fsl_i2c_init())
> I have 2 devices on this bus, one device gets it's initcall
> before fsl_i2c_init, the second one does not :-( This means
> that the second device is never probed.
Can you try this patch?
From: Wolfram Sang <w.sang@pengutronix.de>
Date: Sat, 24 Apr 2010 03:18:16 +0200
Subject: [PATCH] i2c/mpc: use subsys_initcall() to allow early usage of devices
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
drivers/i2c/busses/i2c-mpc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index f1321f7..32a3bae 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -693,13 +693,12 @@ static int __init fsl_i2c_init(void)
" of_register_platform_driver failed (%i)\n", rv);
return rv;
}
+subsys_initcall(fsl_i2c_init);
static void __exit fsl_i2c_exit(void)
{
of_unregister_platform_driver(&mpc_i2c_driver);
}
-
-module_init(fsl_i2c_init);
module_exit(fsl_i2c_exit);
MODULE_AUTHOR("Adrian Cox <adrian@humboldt.co.uk>");
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <w.sang@pengutronix.de>
To: Gary Thomas <gary@mlbassoc.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
linux-i2c@vger.kernel.org
Subject: Re: Initcall ordering
Date: Sat, 24 Apr 2010 03:24:27 +0200 [thread overview]
Message-ID: <20100424012427.GA21255@pengutronix.de> (raw)
In-Reply-To: <4BD1C317.5000909@mlbassoc.com>
[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]
Hi Gary,
(adding linux-i2c)
On Fri, Apr 23, 2010 at 09:56:07AM -0600, Gary Thomas wrote:
> I'm having trouble with the I2C devices on my 8347 platform.
> The problem is that I2C device probe() functions are only called
> once, as the I2C bus is being initialized (in this case fsl_i2c_init())
> I have 2 devices on this bus, one device gets it's initcall
> before fsl_i2c_init, the second one does not :-( This means
> that the second device is never probed.
Can you try this patch?
From: Wolfram Sang <w.sang@pengutronix.de>
Date: Sat, 24 Apr 2010 03:18:16 +0200
Subject: [PATCH] i2c/mpc: use subsys_initcall() to allow early usage of devices
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
drivers/i2c/busses/i2c-mpc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index f1321f7..32a3bae 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -693,13 +693,12 @@ static int __init fsl_i2c_init(void)
" of_register_platform_driver failed (%i)\n", rv);
return rv;
}
+subsys_initcall(fsl_i2c_init);
static void __exit fsl_i2c_exit(void)
{
of_unregister_platform_driver(&mpc_i2c_driver);
}
-
-module_init(fsl_i2c_init);
module_exit(fsl_i2c_exit);
MODULE_AUTHOR("Adrian Cox <adrian@humboldt.co.uk>");
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-04-24 1:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 15:56 Initcall ordering Gary Thomas
2010-04-23 21:54 ` Gary Thomas
2010-04-24 1:24 ` Wolfram Sang [this message]
2010-04-24 1:24 ` Wolfram Sang
2010-04-24 14:26 ` Gary Thomas
2010-04-24 14:26 ` Gary Thomas
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=20100424012427.GA21255@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=gary@mlbassoc.com \
--cc=linux-i2c@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 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.