Re: [PATCH] i2c: mux: Use subsys_initcall for the i2c-arb-gpio-challenge

2014-05-21 Thread Wolfram Sang
On Thu, Apr 24, 2014 at 08:35:22PM +0530, Naveen Krishna Chatradhi wrote:
 From: Doug Anderson diand...@chromium.org
 
 Since many drivers rely on FETs that live behind this arbitrator, they
 can't successfully probe until after the arbitrator comes up.  They
 ought to handle things properly with EPROBE_DEFER and still work, but
 that has some downsides:
 
 1. Those drivers don't come up till later in the boot process.  That
really not so nice for the LCD--we want that to init early.
 2. Some drivers have bugs and don't handle EPROBE_DEFER.  Those
drivers should be fixed but not all of them have been fixed yet.
HDMI is one example since DRM doesn't really have good support for
deferring probes.
 
 With this change We end up using the same init level as the main i2c bus.
 
 Signed-off-by: Doug Anderson diand...@chromium.org
 Reviewed-on: https://gerrit.chromium.org/gerrit/57007
 Reviewed-by: Simon Glass s...@chromium.org
 Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com

Same here. Unless we have a clear understanding that this is the only
acceptable solution in mainline, this is really an out-of-tree patch.



signature.asc
Description: Digital signature


[PATCH] i2c: mux: Use subsys_initcall for the i2c-arb-gpio-challenge

2014-04-24 Thread Naveen Krishna Chatradhi
From: Doug Anderson diand...@chromium.org

Since many drivers rely on FETs that live behind this arbitrator, they
can't successfully probe until after the arbitrator comes up.  They
ought to handle things properly with EPROBE_DEFER and still work, but
that has some downsides:

1. Those drivers don't come up till later in the boot process.  That
   really not so nice for the LCD--we want that to init early.
2. Some drivers have bugs and don't handle EPROBE_DEFER.  Those
   drivers should be fixed but not all of them have been fixed yet.
   HDMI is one example since DRM doesn't really have good support for
   deferring probes.

With this change We end up using the same init level as the main i2c bus.

Signed-off-by: Doug Anderson diand...@chromium.org
Reviewed-on: https://gerrit.chromium.org/gerrit/57007
Reviewed-by: Simon Glass s...@chromium.org
Signed-off-by: Naveen Krishna Chatradhi ch.nav...@samsung.com
---
 drivers/i2c/muxes/i2c-arb-gpio-challenge.c |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c 
b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
index 69afffa..6cf52bb 100644
--- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
+++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
@@ -241,7 +241,17 @@ static struct platform_driver i2c_arbitrator_driver = {
},
 };
 
-module_platform_driver(i2c_arbitrator_driver);
+static int __init i2c_arbitrator_init(void)
+{
+   return platform_driver_register(i2c_arbitrator_driver);
+}
+subsys_initcall(i2c_arbitrator_init);
+
+static void __exit i2c_arbitrator_exit(void)
+{
+   platform_driver_unregister(i2c_arbitrator_driver);
+}
+module_exit(i2c_arbitrator_exit);
 
 MODULE_DESCRIPTION(GPIO-based I2C Arbitration);
 MODULE_AUTHOR(Doug Anderson diand...@chromium.org);
-- 
1.7.9.5

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