lkml.org 
[lkml]   [2015]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] i2c: exynos5: register driver early in subsys initcall to avoid probe defer
Date
i2c bus drivers should be registered earlier than typical drivers to let
important i2c devices (like PMICs/regulators) get registered early
enough to avoid probe defer of all devices in typical embedded system.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.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 b29c7500461a..934a5cbcbdd3 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -867,7 +867,17 @@ static struct platform_driver exynos5_i2c_driver = {
},
};

-module_platform_driver(exynos5_i2c_driver);
+static int __init i2c_adap_exynos5_i2c_init(void)
+{
+ return platform_driver_register(&exynos5_i2c_driver);
+}
+subsys_initcall(i2c_adap_exynos5_i2c_init);
+
+static void __exit i2c_adap_exynos5_i2c_exit(void)
+{
+ platform_driver_unregister(&exynos5_i2c_driver);
+}
+module_exit(i2c_adap_exynos5_i2c_exit);

MODULE_DESCRIPTION("Exynos5 HS-I2C Bus driver");
MODULE_AUTHOR("Naveen Krishna Chatradhi, <ch.naveen@samsung.com>");
--
1.9.2


\
 
 \ /
  Last update: 2015-10-30 15:41    [W:0.072 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site