linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henry Chen <henryc.chen@mediatek.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Sascha Hauer <kernel@pengutronix.de>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>, <henryc.chen@mediatek.com>,
	<eddie.huang@mediatek.com>
Subject: [PATCH] regulator: mt6397: convert to arch_initcall
Date: Wed, 23 Dec 2015 18:16:08 +0800	[thread overview]
Message-ID: <1450865768-10317-1-git-send-email-henryc.chen@mediatek.com> (raw)

Due to some device may need reulator operation in earlier boot time like gpu module which
power domain need regulator power on first. Move regulator of mt6397
initialization earlier in boot so that real devices can use regulator
without probe deferring.

Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
---
 drivers/regulator/mt6397-regulator.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/mt6397-regulator.c b/drivers/regulator/mt6397-regulator.c
index a5b2f47..9b89023 100644
--- a/drivers/regulator/mt6397-regulator.c
+++ b/drivers/regulator/mt6397-regulator.c
@@ -324,7 +324,11 @@ static struct platform_driver mt6397_regulator_driver = {
 	.probe = mt6397_regulator_probe,
 };
 
-module_platform_driver(mt6397_regulator_driver);
+static int __init mt6397_regulator_init(void)
+{
+	return platform_driver_register(&mt6397_regulator_driver);
+}
+arch_initcall(mt6397_regulator_init);
 
 MODULE_AUTHOR("Flora Fu <flora.fu@mediatek.com>");
 MODULE_DESCRIPTION("Regulator Driver for MediaTek MT6397 PMIC");
-- 
1.9.1


             reply	other threads:[~2015-12-23 10:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23 10:16 Henry Chen [this message]
2015-12-23 12:00 ` [PATCH] regulator: mt6397: convert to arch_initcall Mark Brown
2015-12-24  8:10   ` Yingjoe Chen
2016-01-05 13:44     ` Mark Brown

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=1450865768-10317-1-git-send-email-henryc.chen@mediatek.com \
    --to=henryc.chen@mediatek.com \
    --cc=broonie@kernel.org \
    --cc=eddie.huang@mediatek.com \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.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 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).