From: Tony Lindgren <tony@atomide.com>
To: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Benoit Cousson <b-cousson@ti.com>,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
Matt Porter <mporter@ti.com>,
Koen Kooi <koen@dominion.thruhere.net>,
Shubhrajyoti D <shubhrajyoti@ti.com>
Subject: Re: [PATCH 1/3] pinctrl: pinctrl-single must be initialized early.
Date: Tue, 18 Sep 2012 11:21:50 -0700 [thread overview]
Message-ID: <20120918182150.GY11762@atomide.com> (raw)
In-Reply-To: <1348070841-23354-2-git-send-email-panto@antoniou-consulting.com>
Hi,
* Pantelis Antoniou <panto@antoniou-consulting.com> [120918 11:13]:
> When using pinctrl-single to handle i2c initialization, it has
> to be done early.
> On the beaglebone the regulator is connected to the i2c0 bus,
> and for sure that's the case for many other am33xx boards.
Usually it's better to initialize things later than earlier as
that cuts down nasty dependencies and let's us have a proper
debug console before we start initializing things beyond
interrupts and drivers.
Maybe just fix up the i2c-omap.c not to use subsys_initcall()?
And then deferred probe should be able to sort out the dependencies
for other drivers depending on i2c?
Regards,
Tony
> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
> drivers/pinctrl/pinctrl-single.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
> index 76a4260..3acf7f9 100644
> --- a/drivers/pinctrl/pinctrl-single.c
> +++ b/drivers/pinctrl/pinctrl-single.c
> @@ -980,7 +980,17 @@ static struct platform_driver pcs_driver = {
> },
> };
>
> -module_platform_driver(pcs_driver);
> +static int __init pcs_init(void)
> +{
> + return platform_driver_register(&pcs_driver);
> +}
> +postcore_initcall(pcs_init);
> +
> +static void __exit pcs_exit(void)
> +{
> + platform_driver_unregister(&pcs_driver);
> +}
> +module_exit(pcs_exit);
>
> MODULE_AUTHOR("Tony Lindgren <tony@atomide.com>");
> MODULE_DESCRIPTION("One-register-per-pin type device tree based pinctrl driver");
> --
> 1.7.12
>
next prev parent reply other threads:[~2012-09-18 18:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 16:07 [PATCH 0/3] Pinctrl-fy OMAP I2C driver Pantelis Antoniou
2012-09-19 16:07 ` [PATCH 1/3] pinctrl: pinctrl-single must be initialized early Pantelis Antoniou
2012-09-18 18:21 ` Tony Lindgren [this message]
2012-09-18 19:10 ` Pantelis Antoniou
2012-09-21 0:09 ` Tony Lindgren
2012-09-19 16:07 ` [PATCH 2/3] OMAP i2c: pinctrl-ify i2c-omap.c Pantelis Antoniou
2012-09-18 18:23 ` Tony Lindgren
2012-09-18 19:37 ` Pantelis Antoniou
2012-09-19 7:09 ` Shubhrajyoti
2012-09-19 8:34 ` Pantelis Antoniou
2012-09-20 6:34 ` [PATCH 0/2] Pinctrl-fy OMAP I2C driver (V2) Pantelis Antoniou
2012-09-20 6:34 ` [PATCH 1/2] pinctrl: pinctrl-single must be initialized early Pantelis Antoniou
2012-09-20 6:34 ` [PATCH 2/2] OMAP i2c: pinctrl-ify i2c-omap.c Pantelis Antoniou
2012-09-19 10:13 ` Shubhrajyoti Datta
2012-09-19 17:24 ` Tony Lindgren
2012-09-21 7:29 ` [PATCH 2/3] " Peter Ujfalusi
2012-09-21 7:34 ` Pantelis Antoniou
2012-09-19 16:07 ` [PATCH 3/3] i2c: OMAP fix driver initialization message Pantelis Antoniou
2012-09-18 18:24 ` Tony Lindgren
2012-09-18 19:24 ` a0919096
2012-09-18 19:24 ` a0919096
2012-09-19 9:57 ` Pantelis Antoniou
2012-09-19 9:57 ` Pantelis Antoniou
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=20120918182150.GY11762@atomide.com \
--to=tony@atomide.com \
--cc=b-cousson@ti.com \
--cc=koen@dominion.thruhere.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mporter@ti.com \
--cc=panto@antoniou-consulting.com \
--cc=shubhrajyoti@ti.com \
/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.