From patchwork Mon Jun 10 10:03:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 2696641 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 2522B3FD4F for ; Mon, 10 Jun 2013 10:04:19 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UlyxP-0006mN-Cn; Mon, 10 Jun 2013 10:04:11 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UlyxL-0006PT-Mf; Mon, 10 Jun 2013 10:04:07 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UlyxF-0006Ob-K9 for linux-arm-kernel@lists.infradead.org; Mon, 10 Jun 2013 10:04:02 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r5AA3bcA017511; Mon, 10 Jun 2013 05:03:37 -0500 Received: from DNCE71.ent.ti.com (dnce71.ent.ti.com [137.167.131.20]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r5AA3bcu019861; Mon, 10 Jun 2013 05:03:37 -0500 Received: from DNCE05.ent.ti.com ([fe80::5dc0:6ff5:718e:785a]) by DNCE71.ent.ti.com ([fe80::7d60:3983:a688:ea7d%20]) with mapi id 14.02.0342.003; Mon, 10 Jun 2013 12:03:36 +0200 From: "Quadros, Roger" To: Tony Lindgren , "linus.walleij@linaro.org" Subject: RE: [PATCH 3/4] pinctrl: single: omap: Add SoC specific module for wake-up events Thread-Topic: [PATCH 3/4] pinctrl: single: omap: Add SoC specific module for wake-up events Thread-Index: AQHOY8CxuORe7bRxekWeOMK50PqKhpkuupUi Date: Mon, 10 Jun 2013 10:03:36 +0000 Message-ID: <688FBEF7C8277944BE5AED9A41FB1EBC1AB12D0F@DNCE05.ent.ti.com> References: <20130607203936.16513.57494.stgit@localhost>, <20130607205044.16513.27675.stgit@localhost> In-Reply-To: <20130607205044.16513.27675.stgit@localhost> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [157.170.170.49] x-exclaimer-md-config: f9c360f5-3d1e-4c3c-8703-f45bf52eff6b MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130610_060401_753850_B5940739 X-CRM114-Status: GOOD ( 16.93 ) X-Spam-Score: -7.0 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.152 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: "Ujfalusi, Peter" , "devicetree-discuss@lists.ozlabs.org" , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Haojian Zhuang 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile index 9bdaeb8..abf7f01 100644 --- a/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile @@ -30,7 +30,8 @@ obj-$(CONFIG_PINCTRL_NOMADIK) += pinctrl-nomadik.o obj-$(CONFIG_PINCTRL_STN8815) += pinctrl-nomadik-stn8815.o obj-$(CONFIG_PINCTRL_DB8500) += pinctrl-nomadik-db8500.o obj-$(CONFIG_PINCTRL_DB8540) += pinctrl-nomadik-db8540.o -obj-$(CONFIG_PINCTRL_SINGLE) += pinctrl-single.o +pcs-$(CONFIG_ARCH_OMAP2PLUS) += pinctrl-single-omap.o +obj-$(CONFIG_PINCTRL_SINGLE) += pinctrl-single.o $(pcs-y) obj-$(CONFIG_PINCTRL_SIRF) += pinctrl-sirf.o obj-$(CONFIG_PINCTRL_SUNXI) += pinctrl-sunxi.o obj-$(CONFIG_PINCTRL_TEGRA) += pinctrl-tegra.o diff --git a/drivers/pinctrl/pinctrl-single-omap.c b/drivers/pinctrl/pinctrl-single-omap.c new file mode 100644 index 0000000..680cf81 --- /dev/null +++ b/drivers/pinctrl/pinctrl-single-omap.c @@ -0,0 +1,287 @@ +/* + * pinctrl-single-omap - omap specific wake-up irq handler + * + * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +static int __init pcs_omap_init(void) +{ + platform_driver_register(&pcs_omap_soc_driver); + platform_driver_register(&pcs_omap_driver); + + return 0; +} +module_init(pcs_omap_init); It seems this has to be moved to an earlier place (e.g. subsys_initcall) else the pinctrl core fails to find the pinctrl device at the device creation time and bails out with -EPROBE_DEFER. Also, that device is never created again, so -EPROBE_DEFER doesn't seem to work there. The code i'm talking about is in dt_to_map_one_config() http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/pinctrl/devicetree.c#n109 + +static void __exit pcs_omap_exit(void) +{ + platform_driver_unregister(&pcs_omap_driver); + platform_driver_unregister(&pcs_omap_soc_driver); +} +module_exit(pcs_omap_exit); + +MODULE_ALIAS("platform: pinctrl-single-omap"); +MODULE_AUTHOR("Texas Instruments Inc."); +MODULE_DESCRIPTION("pinctrl-single-omap driver"); +MODULE_LICENSE("GPL v2"); diff --git a/include/linux/platform_data/pinctrl-single-omap.h b/include/linux/platform_data/pinctrl-single-omap.h new file mode 100644 index 0000000..bd92efc --- /dev/null +++ b/include/linux/platform_data/pinctrl-single-omap.h @@ -0,0 +1,4 @@ +struct pcs_omap_pdata { + int irq; + void (*reconfigure_io_chain)(void); +}; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel