Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752777AbbLRPGm (ORCPT ); Fri, 18 Dec 2015 10:06:42 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:34349 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751968AbbLRPGl (ORCPT ); Fri, 18 Dec 2015 10:06:41 -0500 X-Listener-Flag: 11101 Message-ID: <1450451196.19539.9.camel@mtksdaap41> Subject: Re: [PATCH] pinctrl: mediatek: convert to arch_initcall From: Yingjoe Chen To: Daniel Kurtz CC: Fabio Estevam , Maoguang Meng , Axel Lin , Hongzhou Yang , Linus Walleij , Patrice Chotard , open list , Fabian Frederick , "open list:PIN CONTROL SUBSYSTEM" , "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , "Jean-Christophe PLAGNIOL-VILLARD" , "moderated list:ARM/Mediatek SoC support" Date: Fri, 18 Dec 2015 23:06:36 +0800 In-Reply-To: <1450412497-25872-1-git-send-email-djkurtz@chromium.org> References: <1450412497-25872-1-git-send-email-djkurtz@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3068 Lines: 80 On Fri, 2015-12-18 at 12:21 +0800, Daniel Kurtz wrote: > Move pinctrl initialization earlier in boot so that real devices can find > their pctldev without probe deferring. > > Signed-off-by: Daniel Kurtz > --- > drivers/pinctrl/mediatek/pinctrl-mt6397.c | 2 +- > drivers/pinctrl/mediatek/pinctrl-mt8127.c | 2 +- > drivers/pinctrl/mediatek/pinctrl-mt8135.c | 2 +- > drivers/pinctrl/mediatek/pinctrl-mt8173.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6397.c b/drivers/pinctrl/mediatek/pinctrl-mt6397.c > index f9751ae..a3780d4 100644 > --- a/drivers/pinctrl/mediatek/pinctrl-mt6397.c > +++ b/drivers/pinctrl/mediatek/pinctrl-mt6397.c > @@ -70,7 +70,7 @@ static int __init mtk_pinctrl_init(void) > return platform_driver_register(&mtk_pinctrl_driver); > } > > -module_init(mtk_pinctrl_init); > +arch_initcall(mtk_pinctrl_init); MT6397 is PMIC, which depends on pwrap on main AP to work. Since pmic-wrap itself is module_platform_driver, I think it make sense to keep this one as module_init. Maybe adding a comment to explain why it is different from others will help. Joe.C > > MODULE_LICENSE("GPL v2"); > MODULE_DESCRIPTION("MediaTek MT6397 Pinctrl Driver"); > diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8127.c b/drivers/pinctrl/mediatek/pinctrl-mt8127.c > index b317b0b..98e0beb 100644 > --- a/drivers/pinctrl/mediatek/pinctrl-mt8127.c > +++ b/drivers/pinctrl/mediatek/pinctrl-mt8127.c > @@ -351,7 +351,7 @@ static int __init mtk_pinctrl_init(void) > return platform_driver_register(&mtk_pinctrl_driver); > } > > -module_init(mtk_pinctrl_init); > +arch_initcall(mtk_pinctrl_init); > > MODULE_LICENSE("GPL v2"); > MODULE_DESCRIPTION("MediaTek MT8127 Pinctrl Driver"); > diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8135.c b/drivers/pinctrl/mediatek/pinctrl-mt8135.c > index 404f117..1c153b8 100644 > --- a/drivers/pinctrl/mediatek/pinctrl-mt8135.c > +++ b/drivers/pinctrl/mediatek/pinctrl-mt8135.c > @@ -366,7 +366,7 @@ static int __init mtk_pinctrl_init(void) > return platform_driver_register(&mtk_pinctrl_driver); > } > > -module_init(mtk_pinctrl_init); > +arch_initcall(mtk_pinctrl_init); > > MODULE_LICENSE("GPL"); > MODULE_DESCRIPTION("MediaTek Pinctrl Driver"); > diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8173.c b/drivers/pinctrl/mediatek/pinctrl-mt8173.c > index ad27184..a62514e 100644 > --- a/drivers/pinctrl/mediatek/pinctrl-mt8173.c > +++ b/drivers/pinctrl/mediatek/pinctrl-mt8173.c > @@ -394,7 +394,7 @@ static int __init mtk_pinctrl_init(void) > return platform_driver_register(&mtk_pinctrl_driver); > } > > -module_init(mtk_pinctrl_init); > +arch_initcall(mtk_pinctrl_init); > > MODULE_LICENSE("GPL v2"); > MODULE_DESCRIPTION("MediaTek Pinctrl Driver"); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/