[PATCH] drivers: i2c-gpio: move initialization code subsys_initcall()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux