From patchwork Thu Apr 24 15:05:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naveen Krishna Chatradhi X-Patchwork-Id: 4051721 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EF7FB9F271 for ; Thu, 24 Apr 2014 15:10:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 277B420304 for ; Thu, 24 Apr 2014 15:10:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2975020303 for ; Thu, 24 Apr 2014 15:10:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdLFT-000867-MM; Thu, 24 Apr 2014 15:07:39 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdLFQ-0007px-0W for linux-arm-kernel@lists.infradead.org; Thu, 24 Apr 2014 15:07:37 +0000 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4J00JBXJC1UK60@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 25 Apr 2014 00:07:13 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.122]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 75.06.11120.0A829535; Fri, 25 Apr 2014 00:07:13 +0900 (KST) X-AuditID: cbfee68f-b7eff6d000002b70-d3-535928a02e9e Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 6C.53.25708.0A829535; Fri, 25 Apr 2014 00:07:12 +0900 (KST) Received: from chnaveen-ubuntu.sisodomain.com ([107.108.83.161]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4J00MABJBLIB50@mmp1.samsung.com>; Fri, 25 Apr 2014 00:07:12 +0900 (KST) From: Naveen Krishna Chatradhi To: linux-i2c@vger.kernel.org Subject: [PATCH] i2c: mux: Use subsys_initcall for the i2c-arb-gpio-challenge Date: Thu, 24 Apr 2014 20:35:22 +0530 Message-id: <1398351922-1647-1-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOLMWRmVeSWpSXmKPExsWyRsSkSnehRmSwwYrtbBZTHz5hs3h5SNPi 7LKDbBavjvxgstj0+BqrRcffL4wWl3fNYbOYcX4fk8Wibf+ZLb5t2cZosfLELGYHbo/ZDRdZ PHbOusvusWlVJ5vH5iX1Hn1bVjF6nDz1hMXj8ya5APYoLpuU1JzMstQifbsEroyN5xULLvFV TH59lrGBcTtPFyMnh4SAiUTz+V5GCFtM4sK99WxdjFwcQgJLGSU2/NrIDlN06dRkJhBbSGAR o8T323IQRf1MErfvrmQDSbAJmEkcXLQarEFEQFai9cEa5i5GDg5mgSlMEotjQMLCAr4Sre+v sILYLAKqEntmPQCzeQVcJPZs7mEBKZcQUJCYM8kGZLyEwCp2ie3n2xkh6gUkvk0+BFUjK7Hp ADPEaZISB1fcYJnAKLiAkWEVo2hqQXJBcVJ6kbFecWJucWleul5yfu4mRmCgn/73rH8H490D 1ocYk4HGTWSWEk3OB0ZKXkm8obGZkYWpiamxkbmlGWnCSuK89x8mBQkJpCeWpGanphakFsUX leakF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bOtE327bAc57QdCWW4oxEQy3m ouJEAFtb/snnAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140424_080736_282865_1062B2A3 X-CRM114-Status: GOOD ( 10.11 ) X-Spam-Score: -5.7 (-----) Cc: linux-samsung-soc@vger.kernel.org, wsa@the-dreams.de, grundler@chromium.org, sjg@chromium.org, linux-kernel@vger.kernel.org, Doug Anderson , broonie@kernel.org, cpgs@samsung.com, naveenkrishna.ch@gmail.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Doug Anderson 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 Reviewed-on: https://gerrit.chromium.org/gerrit/57007 Reviewed-by: Simon Glass Signed-off-by: Naveen Krishna Chatradhi --- 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 ");