All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V1] regulator: fixed: Move drivers to subsys_initcall_sync()
@ 2012-01-04 16:08 Laxman Dewangan
       [not found] ` <1325693335-1905-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Laxman Dewangan @ 2012-01-04 16:08 UTC (permalink / raw)
  To: broonie, lrg; +Cc: linux-tegra, linux-kernel, linux-pm, ldewangan

From: Laxman Dewangan <ldewangan@nvidia.com>

The fixed regulator is used to enable/disable rails which are
mainly controlled by the switch. The switches are toggled by
gpio apis.
The switches are connected through on-chip gpios or through
external devices' gpios like mfd, i2c based gpio expander etc.
The registration of the fixed regulator get success only if the
required gpios are already available in the system at this time.
The on-chip gpios are available till this time as on-chip gpios
are initialized in arch_init(). But external peripheral's gpios
may not be available at this time as they get initialized as part
of subsys_initcall() and due to this registration of the fixed
regulator may fails.
Moving the driver to subsys_initcall_sync() will make sure that
all gpios i.e. on-chip gpios as well as external peripheral's gpios
are available before fixed regulator registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/regulator/fixed.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index a44a017..baec76e 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -307,7 +307,7 @@ static int __init regulator_fixed_voltage_init(void)
 {
 	return platform_driver_register(&regulator_fixed_voltage_driver);
 }
-subsys_initcall(regulator_fixed_voltage_init);
+subsys_initcall_sync(regulator_fixed_voltage_init);
 
 static void __exit regulator_fixed_voltage_exit(void)
 {
-- 
1.7.1.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-06 11:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-04 16:08 [PATCH V1] regulator: fixed: Move drivers to subsys_initcall_sync() Laxman Dewangan
     [not found] ` <1325693335-1905-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-01-05  5:59   ` Mark Brown
2012-01-05  5:59     ` Mark Brown
     [not found]     ` <20120105055900.GE11867-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-01-05  7:35       ` Laxman Dewangan
2012-01-05  7:35         ` Laxman Dewangan
2012-01-06  6:53         ` Mark Brown
2012-01-06 11:19           ` Laxman Dewangan

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.