Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp153913rwb; Wed, 14 Dec 2022 15:21:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf7kla+d8vMg0icxp8mkTdFvuZ4gNGEK+9w9t6hdv/TqjD/kj0hEaA/68mipWnqMPbWYPC4/ X-Received: by 2002:aa7:81cb:0:b0:56c:3fba:c5ca with SMTP id c11-20020aa781cb000000b0056c3fbac5camr25053545pfn.16.1671060113802; Wed, 14 Dec 2022 15:21:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671060113; cv=none; d=google.com; s=arc-20160816; b=pD4AEjcwVa6vFy2js2KFokgF3PuO4ywj8AcFYyNkgV5VfTIe489n90tnIkCF/xrGFh RJd18l/M0qR1MHui4y3y6m4Z8Qm09PaQv/zH0MXptlAzVsHhA2uG2wU6eTbJI8vgIfMP VEzTbtE+3tGxUlHIRAqHYsg5bpJiBLsVf7bwFsCSyUA/xWSPLqz8r0mRUTtze/VdW5zF FHfAnE9GmqsDhYjh6AxSmGXRQh4OFefFjmNDl3lK6S3XbQS0HxlPwUh3HSvhdL/5Kmqv AeMXUHX4sWmjBBkvRPMJx/dul12P30RPbCsB2VDLD2NLSSx8G3qa96CPGEBOcp66zRFC AzcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3ehVNxRAk8vtcQmEsS2DeBEXBsGDUIlgGFYWQTXu6Hk=; b=lslCrYkRmA6mF0knUFkeFlUCeQMfk2nWpaYr7p+bk+PcgIiaO31NSb3GpLDHd5tCG+ 188RHeN9x0tkmdecmL0r4zxSaT/QAqTHj7xsRVfjkkagy4KxAOamcoYFjxlVVAbclWP3 kJ98hKwniPlUL0agm/gWl93DRqy3L0C9x3IhsGI8EaEZuD20iQCa2joiJBRBtx3EW/OG FE9iO0BrUCsJ849ebcam9N0xCFcDUTwdGPB4kgcgJd38mFb7OKWeyXYml3PbugIOejyD kygmvC9fq3q7ut6I6pW6gvlvKtE/BIbMaeWItaIeGskb4w59AHm0lwTjw2axS0rznLTP SGqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=XGNT1V8b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k19-20020a056a00169300b00562a956d979si1296304pfc.67.2022.12.14.15.21.44; Wed, 14 Dec 2022 15:21:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=XGNT1V8b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229714AbiLNXJF (ORCPT + 70 others); Wed, 14 Dec 2022 18:09:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbiLNXJD (ORCPT ); Wed, 14 Dec 2022 18:09:03 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07AA843847 for ; Wed, 14 Dec 2022 15:09:02 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id k88-20020a17090a4ce100b00219d0b857bcso860359pjh.1 for ; Wed, 14 Dec 2022 15:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3ehVNxRAk8vtcQmEsS2DeBEXBsGDUIlgGFYWQTXu6Hk=; b=XGNT1V8bB+E+b7ARt7dy88tch1s1aCC7J585miYX8QJAQHTQDryfRyy/yUbZe84R3Z QJ7OhpwNdCrA01EPKWFvknWSPw+t9xl6+DApoaVCcW9P6hnZtW89BYPZAJ42P547x/26 meb60w9D91tfFRNBLiL1qGf8wirGUo1fIfqMeHLIpjqP9c1zUtguR4FFW4p6uewrkK86 xKAydwss7Ktfjm8lJXjr8VmFLpKBGTgpQ5ZyG54z3vn2vPZMkDHePBP9fauHDYHKsmcP HmzlCquXfd7JZcmZ5jRnUHrATM998CH2pypijXpvXMtUOZSQ9JXbvaIr0ZWopAfdXi6o tkpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3ehVNxRAk8vtcQmEsS2DeBEXBsGDUIlgGFYWQTXu6Hk=; b=8HnrBNtlkTFv68JGHFdyTv0mCpd8SBzGHE05tbCQS/Cw0GcLebGVW+zHOe4SQbtkP7 WuPMzwVuk9Mj/5FoFUsa2ihNphM2gT7Xt22rzZn9bbMfkUmz7y0Kb3ki97hESgM7z+Dx CCijOdfBZjh3nqv0WmA5WO5QN1MTgujjM+lfmWxfNhX7Ldt5TGO+NYgLNC1MuzCqTDRI 9ZXs1PNtIFbof51dAtX0AcnC59wcgmnkQekstH8m1fs880v3yM1eHzBCXxzdLwVaqdAK 0r9TJx6Tz7dkoFTsQRoVAjXL07nvORAzmRHTwZZ8dAViY9A6Iz+wUP/1HMSxhctoV4Bi W4/w== X-Gm-Message-State: ANoB5pkbHc2MqMN8gccPDFLp0NIWINFGFcWdokBzGNtQ/qy1KYOhxMIR 35Ugl672YjYukxskuJcKiCVyXRmMHe3u5IVWX5Hq6A== X-Received: by 2002:a17:902:eac5:b0:189:f06e:fd93 with SMTP id p5-20020a170902eac500b00189f06efd93mr11179976pld.37.1671059341322; Wed, 14 Dec 2022 15:09:01 -0800 (PST) MIME-Version: 1.0 References: <20221128054820.1771-1-clin@suse.com> <20221128054820.1771-3-clin@suse.com> In-Reply-To: From: Saravana Kannan Date: Wed, 14 Dec 2022 15:08:25 -0800 Message-ID: Subject: Re: [PATCH v2 2/2] pinctrl: add NXP S32 SoC family support To: Linus Walleij Cc: Chester Lin , Fabio Estevam , Dong Aisheng , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , s32@nxp.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Larisa Grigore , Ghennadi Procopciuc , Andrei Stefanescu , Radu Pirea , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Matthias Brugger , Matthew Nunez , Phu Luu An , Stefan-Gabriel Mirea Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 9, 2022 at 3:26 AM Linus Walleij wrote: > > On Fri, Dec 9, 2022 at 5:39 AM Chester Lin wrote: > > > > Hi Linus and Fabio, > > > > Thanks for your time to review this patch! > > > > On Thu, Dec 08, 2022 at 10:37:36PM +0100, Linus Walleij wrote: > > > On Thu, Dec 8, 2022 at 12:04 AM Fabio Estevam wrote: > > > > > > > In other imx8m pinctrl drivers we pass: > > > (...) > > > > > +module_platform_driver(s32g_pinctrl_driver); > > > > > > > > And we also register it in arch_initcall() level. > > > > > > Do you really need that though? This driver certainly does not. > > > > > > I was under the impression that recent changes to the probe-order > > > logic has made most explicit arch_ etc initcall orderings surplus. > > > > > > > Could bool/tristate options in the Kconfig be the key point? > > > > Based on current design I prefer to build the s32g2 pinctrl driver as built-in > > rather than a loadable module. IIUC, when the driver is not built as module > > then the initcall ordering should still matter. > > It is true that if you compile something into a module then all initicalls > are the same: they are called when the module is loaded. > > But the remaining initcalls used to be assigned to core, arch, subsystem > etc in order for resources (such as clocks, regulators or pins) to be > available before the drivers that need them get probed. > > However there was first deferred probe to partially solve the problem > and recently a large and refined series that use the dependencies in > the device tree to resolve probe order. > > Saravana Kannan has been working tirelessly at this, issueing > git log --oneline --author="Saravana Kannan" > you will see the scope of this work. > Thanks Linus. For a system using DT, fw_devlink's goal is to make module load ordering or driver registration ordering irrelevant to proper functioning of the kernel/drivers. It should automatically figure out the dependencies and have the devices probe in the right order. It's already true for at least 80% of the cases for a system using DT. There are some known issues I'm either working on or have on my To do list. So, if you see a case where fw_devlink is not handling it correctly, please let me know. -Saravana