[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1398350916-885-1-git-send-email-ch.naveen@samsung.com>
Date: Thu, 24 Apr 2014 20:18:36 +0530
From: Naveen Krishna Chatradhi <ch.naveen@...sung.com>
To: linux-i2c@...r.kernel.org
Cc: naveenkrishna.ch@...il.com, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, sjg@...omium.org,
grundler@...omium.org, linux-kernel@...r.kernel.org,
wsa@...-dreams.de, cpgs@...sung.com, broonie@...nel.org
Subject: [PATCH] i2c: exynos5: Initialise Samsung High Speed I2C controller
early
This patch moves initialization code to subsys_initcall() to ensure
that the i2c bus is available early so the regulators can be quickly
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
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@...sung.com>
---
drivers/i2c/busses/i2c-exynos5.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 00af0a0..20e3077 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -762,8 +762,18 @@ static struct platform_driver exynos5_i2c_driver = {
},
};
-module_platform_driver(exynos5_i2c_driver);
+static int __init i2c_adap_exynos5_init(void)
+{
+ return platform_driver_register(&exynos5_i2c_driver);
+}
+subsys_initcall(i2c_adap_exynos5_init);
+
+static void __exit i2c_adap_exynos5_exit(void)
+{
+ platform_driver_unregister(&exynos5_i2c_driver);
+}
+module_exit(i2c_adap_exynos5_exit);
MODULE_DESCRIPTION("Exynos5 HS-I2C Bus driver");
MODULE_AUTHOR("Naveen Krishna Chatradhi, <ch.naveen@...sung.com>");
MODULE_AUTHOR("Taekgyun Ko, <taeggyun.ko@...sung.com>");
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists