From patchwork Wed Sep 19 16:07:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 1474041 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 3D44DDF24C for ; Tue, 18 Sep 2012 18:13:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752930Ab2IRSMH (ORCPT ); Tue, 18 Sep 2012 14:12:07 -0400 Received: from li42-95.members.linode.com ([209.123.162.95]:56252 "EHLO li42-95.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751732Ab2IRSMG (ORCPT ); Tue, 18 Sep 2012 14:12:06 -0400 Received: from sles11esa.localdomain (unknown [195.97.110.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: panto) by li42-95.members.linode.com (Postfix) with ESMTPSA id 4310D9C1C1; Tue, 18 Sep 2012 18:12:03 +0000 (UTC) From: Pantelis Antoniou To: Benoit Cousson Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Porter , Koen Kooi , Shubhrajyoti D , Tony Lindgren , Pantelis Antoniou Subject: [PATCH 1/3] pinctrl: pinctrl-single must be initialized early. Date: Wed, 19 Sep 2012 19:07:19 +0300 Message-Id: <1348070841-23354-2-git-send-email-panto@antoniou-consulting.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1348070841-23354-1-git-send-email-panto@antoniou-consulting.com> References: <1348070841-23354-1-git-send-email-panto@antoniou-consulting.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org When using pinctrl-single to handle i2c initialization, it has to be done early. On the beaglebone the regulator is connected to the i2c0 bus, and for sure that's the case for many other am33xx boards. Signed-off-by: Pantelis Antoniou --- drivers/pinctrl/pinctrl-single.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 76a4260..3acf7f9 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -980,7 +980,17 @@ static struct platform_driver pcs_driver = { }, }; -module_platform_driver(pcs_driver); +static int __init pcs_init(void) +{ + return platform_driver_register(&pcs_driver); +} +postcore_initcall(pcs_init); + +static void __exit pcs_exit(void) +{ + platform_driver_unregister(&pcs_driver); +} +module_exit(pcs_exit); MODULE_AUTHOR("Tony Lindgren "); MODULE_DESCRIPTION("One-register-per-pin type device tree based pinctrl driver");