From patchwork Wed Apr 27 09:56:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 12828643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A40AEC4332F for ; Wed, 27 Apr 2022 10:59:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232086AbiD0LCm (ORCPT ); Wed, 27 Apr 2022 07:02:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232036AbiD0LCY (ORCPT ); Wed, 27 Apr 2022 07:02:24 -0400 Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F8463E3854; Wed, 27 Apr 2022 03:40:47 -0700 (PDT) Received: from relay12.mail.gandi.net (unknown [217.70.178.232]) by mslow1.mail.gandi.net (Postfix) with ESMTP id E9356CC4FE; Wed, 27 Apr 2022 09:57:49 +0000 (UTC) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id C3909200003; Wed, 27 Apr 2022 09:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1651053429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0OljYX8T7FsVZPSXMLNUJCohapQMxVrJMDIq7e2J5A4=; b=FTv55tITzCMYcQLjzkavslm8rXVNjPrhdKy9Gj5jCHzpJo6UjjgqtdcRRRrp2BCZq3IjqQ 5ZHGPqtYPBVrzv+cTdFR77MA1ndlr5Tm2Hd8TueDhz+6eE8TDPOLn1pvToUtCtytWoEQ63 nHDC7AFgm3vymRE/qRYs6jGtIbxusg6D0YWweXPqlZ5WH+McatODhp1NJiYWS00ODn6KXg H+A7pm3fiwVNrSnBeI80cKX+kb0LJZE2b8NNqlY/yHJJZJcwoWFoYOHrjwo/rQLym5KDOh Et/OZsSlbsCxMsCsGDRyRLlYSQC+Nn1ASU2d0vbx4abd1YA3pkD7p8r7LEEV0Q== From: Miquel Raynal To: Magnus Damm , Gareth Williams , Phil Edworthy , Geert Uytterhoeven , Vinod Koul Cc: Miquel Raynal , linux-renesas-soc@vger.kernel.org, dmaengine@vger.kernel.org, Milan Stevanovic , Jimmy Lalande , Pascal Eberhard , Thomas Petazzoni , Herve Codina , Clement Leger , Stephen Boyd , Michael Turquette , linux-clk@vger.kernel.org, Viresh Kumar , Andy Shevchenko , Ilpo Jarvinen , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v12 6/9] clk: renesas: r9a06g032: Probe possible children Date: Wed, 27 Apr 2022 11:56:50 +0200 Message-Id: <20220427095653.91804-7-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220427095653.91804-1-miquel.raynal@bootlin.com> References: <20220427095653.91804-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org The clock controller device on r9a06g032 takes all the memory range that is described as being a system controller. This range contains many different (unrelated?) registers besides the ones belonging to the clock controller, that can necessitate to be accessed from other peripherals. For instance, the dmamux registers are there. The dmamux "device" will be described as a child node of the clock/system controller node, which means we need the top device driver (the clock controller driver in this case) to populate its children manually. In case of error when populating the children, we do not fail the probe on purpose to keep the clk driver up and running. Signed-off-by: Miquel Raynal Acked-by: Stephen Boyd Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- drivers/clk/renesas/r9a06g032-clocks.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c index 052d99059981..69c0eb0eabd1 100644 --- a/drivers/clk/renesas/r9a06g032-clocks.c +++ b/drivers/clk/renesas/r9a06g032-clocks.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -996,6 +997,10 @@ static int __init r9a06g032_clocks_probe(struct platform_device *pdev) sysctrl_priv = clocks; + error = of_platform_populate(np, NULL, NULL, dev); + if (error) + dev_err(dev, "Failed to populate children (%d)\n", error); + return 0; }