Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2825567imm; Fri, 20 Jul 2018 05:43:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdvDg50hkkCk1ak/CQgEd/8P7VcLKuKgQmCU/MX4/9jKEICeD731hPN4vN5C7F3NCtbx1K1 X-Received: by 2002:a62:d98f:: with SMTP id b15-v6mr2060444pfl.1.1532090619703; Fri, 20 Jul 2018 05:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532090619; cv=none; d=google.com; s=arc-20160816; b=j6WewNAPp+3ZyhbNt5OyksIF4sGC6Mla9L2UbSz/mLvLYEr14BKsDvizqXKs7JYVks zC0Yjirssu5s/klbDcMb7TU23aKW4lFhQ61htOibmKUep53b+mLnLWWspoMkMUjtEMDf +4o4nU+ZqwQ2Qiy8gFSSKUM6AxWNoM/zWLY80wQBztQR/e3Kd96Bw2105WZLCOMkJcHV PBaL8wtXkA6WksS/Koj6soisx0UqiqI0AmGPkRzTpEiXGgIK8rodGr1eII0QXHyaZzyX gXDIjidiNdNgNhRy50DBB8YiXPc4k/Rb7s6vTUG3kWWrM4GlaWQ+QxWwcO3rDoW+jCzh CJvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:arc-authentication-results; bh=jTfpafMlco3ewluiNtKxVRpaSEkeF9WHkab90rrrCmY=; b=xEOw4hKLitBw3nyGKZhrYwWIkVyyIrORrP1vAdu8CWTVzttTItUQbWGv1/KzCtkk1m 0bFzI25OxqAPzH/LVeUFNCR2fLngnQvYQueW5YqrfhhMJx6dgVcfdK4ZrdoOfppTY7/b 5cpGPcQulMHDk5jjVUFEeWNsCiSMDXoTQPVrE/CF2iAMLgKodOgl4zjhKjj60pD2lLGz QuCieVuT2iOfpYt7FRuEflVkYAla3UW/2BYvlHdd0HFBYtRD1okLN0Ukm66JIi4pMeqB 9RLOCfzywJvJRIlgK489CFA95KmSoQywPsZnccWs/bpxJJZfjgW44auDm058jQMWm910 LP1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p35-v6si1874017pgl.202.2018.07.20.05.43.25; Fri, 20 Jul 2018 05:43:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389967AbeGTN3i (ORCPT + 99 others); Fri, 20 Jul 2018 09:29:38 -0400 Received: from mail-ua0-f194.google.com ([209.85.217.194]:36754 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388863AbeGTN3i (ORCPT ); Fri, 20 Jul 2018 09:29:38 -0400 Received: by mail-ua0-f194.google.com with SMTP id y8-v6so7378992uan.3; Fri, 20 Jul 2018 05:41:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jTfpafMlco3ewluiNtKxVRpaSEkeF9WHkab90rrrCmY=; b=SNrgkx5E5nl2HvHMOfebDnquXAOIxCZSB1AUQRKNcq4bJ+B7m+bbhnvpVjw4k2hGjF jytaEDkNS99VP330lSr6jZXzpnawnNkroep/zXUNezK7sM/lRd5j4RYdAlgVyxzUCsEQ dmtRBA2Hc9JNRRbJMOJT9+OnxhVeHQY+CKpMVisv/XY7T3V7kpjw//CfrB9E7yynp7Nz RUGbxKr3ORJHMkqiIRA7KBdhWu5u+QY8GlwNY6Qd5cAmOduuSRBlUMvOf3HGz2/WLo7J 7k9EO675x8YD/KbPLGhaQdyNFYSX01R2WtT7HDyyOLdI68D9oSeOZ22snP1NXPjM+XzK eFcA== X-Gm-Message-State: AOUpUlF6hd9heff1Z0KYUk8GJkkfKmveD82JYQaf+lFB0BYmZk4522Vm o+uoHFu+UP7kIEZWjGPV9SfV8+9aHEgx+zGqg+Dc/+3v X-Received: by 2002:ab0:221:: with SMTP id 30-v6mr1334284uas.26.1532090493119; Fri, 20 Jul 2018 05:41:33 -0700 (PDT) MIME-Version: 1.0 References: <1531924476-23261-1-git-send-email-phil.edworthy@renesas.com> In-Reply-To: From: Geert Uytterhoeven Date: Fri, 20 Jul 2018 14:41:20 +0200 Message-ID: Subject: Re: [PATCH] clk: renesas: r9a06g032: Avoid needless probe deferring To: Phil Edworthy Cc: Simon Horman , linux-clk , Linux Kernel Mailing List , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Phil, On Fri, Jul 20, 2018 at 2:26 PM Phil Edworthy wrote: > On 20 July 2018 13:12, Geert Uytterhoeven wrote: > > On Fri, Jul 20, 2018 at 2:06 PM Phil Edworthy wrote: > > > On 20 July 2018 12:21, Geert Uytterhoeven wrote: > > > > On Wed, Jul 18, 2018 at 4:34 PM Phil Edworthy wrote: > > > > > To avoid all SoC peripheral drivers deferring their probes, both > > > > > clock and pinctrl drivers should already be probed. Since the > > > > > pinctrl driver requires a clock to access the registers, the clock > > > > > driver should be probed before the pinctrl driver. > > > > > > > > > > Therefore, move the clock driver from subsys_initcall to core_initcall. > > > > > > > > > > Signed-off-by: Phil Edworthy > > > > > > > > Thanks for your patch! > > > Thanks for your review! > > > > > > > The (not yet upstreamed) pinctrl driver uses postcore_initcall(), right? > > > No, the pinctrl driver uses subsys_initcall, but postcore_initcall or > > > arch_initcall may be better to make it clear about the dependencies. > > > > if the pinctrl driver uses subsys_initcall(), ... > > > > > -subsys_initcall(r9a06g032_clocks_init); > > > > > +core_initcall(r9a06g032_clocks_init); > > > > ... using postcore_initcall() or arch_initcall() here, should work with > > platform_driver_probe()? > Nope, you have to use platform_driver_register() for DT based drivers. > subsys_initcall is the earliest you can use platform_driver_probe(). So drivers/misc/atmel_tclib.c and drivers/pinctrl/pinctrl-coh901.c, which use arch_initcall(), cannot work? If that is really true, you can still use subsys_initcall() in the clock driver, and subsys_initcall_sync() in the pinctrl driver. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds