From patchwork Thu Sep 20 06:34:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 1476461 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6AE5C3FE4F for ; Wed, 19 Sep 2012 08:41:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754354Ab2ISIku (ORCPT ); Wed, 19 Sep 2012 04:40:50 -0400 Received: from li42-95.members.linode.com ([209.123.162.95]:40392 "EHLO li42-95.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753343Ab2ISIjj (ORCPT ); Wed, 19 Sep 2012 04:39:39 -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 A56F99C163; Wed, 19 Sep 2012 08:39:37 +0000 (UTC) From: Pantelis Antoniou To: Shubhrajyoti D Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Porter , Koen Kooi , Benoit Cousson , Tony Lindgren , Pantelis Antoniou Subject: [PATCH 1/2] pinctrl: pinctrl-single must be initialized early. Date: Thu, 20 Sep 2012 09:34:48 +0300 Message-Id: <1348122889-28271-2-git-send-email-panto@antoniou-consulting.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1348122889-28271-1-git-send-email-panto@antoniou-consulting.com> References: <50596F8F.60506@ti.com> <1348122889-28271-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");