From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FDD7C388F9 for ; Fri, 23 Oct 2020 11:36:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B3C620EDD for ; Fri, 23 Oct 2020 11:36:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="P1yRmNTS"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="HfukXPPC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B3C620EDD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=36njIMif1I2tY4Q72f+a0SUjd611PqAER1fSa/RG650=; b=P1yRmNTStwjZgmMyjNJyiMIN8 //15v8jcVqWF49+RkaB6kfdl+SDY3zm6ShnxBPw1CzlTUW4tc7k44n8VHGjGe6nYAI1+QSVjrUyXB Tx6cVvBUt+/PgwQfbSxlH8BgReEMGH5u/Iu3zVpIkp2HX0Wh1/5+RHrBsmz7kggVjDPxw9C2MV4VL xWILf+11LgQHg7FEa+k9I75adshjFXdLhLXZnUCDYpiMum6CvZe9WHPPvX2aOdcBJXPE2hD1tZdeN c7N0XvkKYwlo/vw3vx5NIG56689f/wbX+nj/x4lvVudbUFfG/m1IevZ9U8db2Uq7ZaaJQl62+o7SP jaHbq5LJQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVvL2-0002pn-7e; Fri, 23 Oct 2020 11:34:28 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVvL0-0002p9-3k for linux-arm-kernel@lists.infradead.org; Fri, 23 Oct 2020 11:34:26 +0000 Received: from [192.168.0.50] (89-70-52-201.dynamic.chello.pl [89.70.52.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF78720EDD; Fri, 23 Oct 2020 11:34:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603452864; bh=yitxDveLp7gb378cd6M1GqApDS4EOwZaZ6lGFlzXqqI=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=HfukXPPCI8BYXcw33DKfMyyUWbj+lWHR4Aumc1/9R1kRiVOwYZdTlUrXATexQc8ZY gKfgamMkM5dsYQDHncbbbHExJ8+jB+0HzYJhIz+8WGs5zgoE7nMxKe1YnY9j+iTdXY Fp4mCGMV/U7Ndd6acxj9fTwBv+ZQt5L4TmnMRBdg= Subject: Re: [PATCH 1/2] soc: samsung: exynos-pmu: instantiate clkout driver as MFD To: Krzysztof Kozlowski , Tomasz Figa , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20201001165646.32279-1-krzk@kernel.org> <20201001165646.32279-2-krzk@kernel.org> From: Sylwester Nawrocki Message-ID: <32d3faaf-1631-3ebe-6d73-fe565c39639d@kernel.org> Date: Fri, 23 Oct 2020 13:34:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201001165646.32279-2-krzk@kernel.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201023_073426_257229_F8C80953 X-CRM114-Status: GOOD ( 19.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Stephen Boyd , Michael Turquette , Chanwoo Choi , Kukjin Kim , Sylwester Nawrocki , Marek Szyprowski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 10/1/20 18:56, Krzysztof Kozlowski wrote: > The Exynos clock output (clkout) driver uses same register address space > (Power Management Unit address space) as Exynos PMU driver and same set > of compatibles. It was modeled as clock provider instantiated with > CLK_OF_DECLARE_DRIVE(). > > This however brings ordering problems and lack of probe deferral, > therefore clkout driver should be converted to a regular module and > instantiated as a child of PMU driver to be able to use existing > compatibles and address space. It might have been cleaner to have the CLKOUT device as a PMU subnode in DT, then device instantiation would be already covered by devm_of_platform_populate(). But it gets a bit complicated to make such a change in a backward compatible way. I have tested both patches on Trats2, where CLKOUT provides master clock for the audio codec. Reviewed-by: Sylwester Nawrocki Tested-by: Sylwester Nawrocki > @@ -128,6 +134,11 @@ static int exynos_pmu_probe(struct platform_device *pdev) > > platform_set_drvdata(pdev, pmu_context); > > + ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, exynos_pmu_devs, > + ARRAY_SIZE(exynos_pmu_devs), NULL, 0, NULL); > + if (ret) > + return ret; > + > if (devm_of_platform_populate(dev)) > dev_err(dev, "Error populating children, reboot and poweroff might not work properly\n"); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel