linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: i2c-gpio: move initialization code subsys_initcall()
@ 2010-04-01 13:43 Marek Szyprowski
       [not found] ` <1270129399-30365-1-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Szyprowski @ 2010-04-01 13:43 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Ben Dooks
  Cc: m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
	kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ, Mark Brown

GPIO driven I2C bus can be used for controlling the PMIC chip. The example
of such configuration is Samsung Aquila board.

This patch moves initialization code subsys_initcall() to ensure that the i2c
bus is available early so the regulators can be quicly probed and available for
other devices on their probe() call.

Such solution has been proposed by Mark Brown to fix the problem of the
regulators not beeing available on the peripheral device probe():
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/011971.html

CC: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
Reviewed-by: Kyungmin Park <kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

---
 drivers/i2c/busses/i2c-gpio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 32104ea..bb1a1a8 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -210,7 +210,7 @@ static int __init i2c_gpio_init(void)
 
 	return ret;
 }
-module_init(i2c_gpio_init);
+subsys_initcall(i2c_gpio_init);
 
 static void __exit i2c_gpio_exit(void)
 {
-- 
1.6.4

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

end of thread, other threads:[~2010-04-06  6:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01 13:43 [PATCH] drivers: i2c-gpio: move initialization code subsys_initcall() Marek Szyprowski
     [not found] ` <1270129399-30365-1-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2010-04-01 13:49   ` Wolfram Sang
     [not found]     ` <20100401134917.GF24265-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-01 14:30       ` Jean Delvare
     [not found]         ` <20100401163018.5494f19b-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-04-06  6:49           ` Marek Szyprowski

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).