From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23AAE2FAE for ; Fri, 3 Sep 2021 15:21:16 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 5653A580AA5; Fri, 3 Sep 2021 11:21:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 03 Sep 2021 11:21:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= to:cc:references:from:subject:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=Y 0N7oM6dRDQR8Rmd/jesZW+rQHwZCpQ3qcTW6TwuJYs=; b=jPbVywF+6na90WQPo qeKreZA40pfwqQygvLunDJbTNub1BiDqSbtwY0WNLj34gfncXZizSrlGIUYevdSG gTIdmXmmD62EuN6uAR5EZaHzDOwLJ420w9D1vwVUYwwSZRk01hF/WhnpIZH5C8s3 r0KgF4yfA8rsiKQ7ctRGJ6UwwzkBkvJN8zuwZH+rv2GkbABr6NKQ9etp8M+UnTUl YkfrjkDJpsZRcRi6SenR5GdE539P12xZv5UfCB4LOj3hj//AnzED4zVZ2MCQzZLt xU4h0f+GzDH/FD1/4uFNcd0C41KjLLdZ8dgx9vxzSrsBSuj4yiC5TdbgswOauMDa kyISw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=Y0N7oM6dRDQR8Rmd/jesZW+rQHwZCpQ3qcTW6TwuJ Ys=; b=Bk6hzej+JtMyUT+mdvkAp7lojXdG0saAcMI+sUqDu/nfdXbCMJj6XGLKz 2uNxsYAFXt9qIpwmNVNyXgCCxQryjKXUxPmc0qAJK1Jepyu9cy4XJpKbjpBU+e/c cNxUxgagRZN3Vymtku4IC879wDo7gEYQSNtse6uhgTtD4W/e0YuZFzjAimCEEr+J fLHZr8QV0Cwp5H+Z8TqQyxIGV11f+Qc7laZJtKlUal6XzspVRvWvG7b7Iww+yRt1 lkQq1UGyNmq3DtWi89rdFfNMknSqcCX3d2rVg8APrhtJIM4jShHFwxNOAGD2vvWO 5aNwhrqlbwWOdHu8B1YZfT1bTuPGg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvjedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepvfhfhffukffffgggjggtgfesthekredttdefheenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepheejgefhudeffeetleeigefgheetveeiteeuffehhfffkeeuvdff veffveetudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 Sep 2021 11:21:13 -0400 (EDT) To: Maxime Ripard Cc: Chen-Yu Tsai , Jernej Skrabec , Rob Herring , Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org References: <20210901053951.60952-1-samuel@sholland.org> <20210903145013.hn6dv7lfyvfys374@gilmour> From: Samuel Holland Subject: Re: [RFC PATCH 0/7] clk: sunxi-ng: Add a RTC CCU driver Message-ID: <4a187add-462b-dfe4-868a-fdab85258b8d@sholland.org> Date: Fri, 3 Sep 2021 10:21:13 -0500 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20210903145013.hn6dv7lfyvfys374@gilmour> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit On 9/3/21 9:50 AM, Maxime Ripard wrote: > Hi, > > On Wed, Sep 01, 2021 at 12:39:44AM -0500, Samuel Holland wrote: >> This patch series adds a CCU driver for the RTC in the H616 and R329. >> The extra patches at the end of this series show how it would be >> explanded to additional hardware variants. >> >> The driver is intended to support the existing binding used for the H6, >> but also an updated binding which includes all RTC input clocks. I do >> not know how to best represent that binding -- that is a major reason >> why this series is an RFC. >> >> A future patch series could add functionality to the driver to manage >> IOSC calibration at boot and during suspend/resume. >> >> It may be possible to support all of these hardware variants in the >> existing RTC clock driver and avoid some duplicate code, but I'm >> concerned about the complexity there, without any of the CCU >> abstraction. >> >> This series is currently based on top of the other series I just sent >> (clk: sunxi-ng: Lifetime fixes and module support), but I can rebase it >> elsewhere. > > I'm generally ok with this, it makes sense to move it to sunxi-ng, > especially with that other series of yours. > > My main concern about this is the split driver approach. We used to have > that before in the RTC too, but it was mostly due to the early clock > requirements. With your previous work, that requirement is not there > anymore and we can just register it as a device just like the other > clock providers. That's a good point. Originally, I had this RTC CCU providing osc24M, so it did need to be an early provider. But with the current version, we could have the RTC platform driver call devm_sunxi_ccu_probe. That does seem cleaner. (Since it wasn't immediately obvious to me why this works: the only early provider remaining is the sun5i CCU, and it doesn't use the sun6i RTC driver.) > And since we can register all those clocks at device probe time, we > don't really need to split the driver in two (and especially in two > different places). The only obstacle to this after your previous series > is that we don't have of_sunxi_ccu_probe / devm_sunxi_ccu_probe > functions public, but that can easily be fixed by moving their > definition to include/linux/clk/sunxi-ng.h Where are you thinking the clock definitions would go? We don't export any of those structures (ccu_mux, ccu_common) or macros (SUNXI_CCU_GATE_DATA) in a public header either. Would you want to export those? That seems like a lot of churn. Or would we put the CCU descriptions in drivers/clk/sunxi-ng and export a function that the RTC driver can call? (Or some other idea?) Regards, Samuel 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=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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 6444BC433EF for ; Fri, 3 Sep 2021 15:22:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2ACC6610FA for ; Fri, 3 Sep 2021 15:22:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2ACC6610FA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:Subject:From:References:Cc:To:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=jpd3HP2hk3PZOYSlIUIwInxy0A8WekwntsHBaIKTvSs=; b=Wmfdm2r3eRNEZ+wOQ23S0ZlhZr dnD2otMjiO9dvGLKSLieHxnCRtw/Q+UoPv+Xg8Iq05UmTgWCoO13fUvt3/wsa+jcUsw0DalZ068DA dIaGXjVJJcV3bo1S7/1LsTR/qngGiCjTDq9GbnwB8rEecRAJf0C27lDwLmn6hGz2kv8Qr6akteeW0 EUz0s8ki9oIdtGw0cBYoVcSpoN/5aevpXNKdkXmec52USVUIAYGDiFRTerQrprdivI3H/PC1ru0X0 YuzIoJROGHWphl+DZEHA+8AzmtraPMnXrtArAZGGOoUcnHsi4y6XSnYMx7qh3MiHXAfmmLOpwFGVU IeQKtJuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMB0J-00CIGn-KD; Fri, 03 Sep 2021 15:21:19 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMB0G-00CIFD-8V for linux-arm-kernel@lists.infradead.org; Fri, 03 Sep 2021 15:21:17 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 5653A580AA5; Fri, 3 Sep 2021 11:21:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 03 Sep 2021 11:21:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= to:cc:references:from:subject:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=Y 0N7oM6dRDQR8Rmd/jesZW+rQHwZCpQ3qcTW6TwuJYs=; b=jPbVywF+6na90WQPo qeKreZA40pfwqQygvLunDJbTNub1BiDqSbtwY0WNLj34gfncXZizSrlGIUYevdSG gTIdmXmmD62EuN6uAR5EZaHzDOwLJ420w9D1vwVUYwwSZRk01hF/WhnpIZH5C8s3 r0KgF4yfA8rsiKQ7ctRGJ6UwwzkBkvJN8zuwZH+rv2GkbABr6NKQ9etp8M+UnTUl YkfrjkDJpsZRcRi6SenR5GdE539P12xZv5UfCB4LOj3hj//AnzED4zVZ2MCQzZLt xU4h0f+GzDH/FD1/4uFNcd0C41KjLLdZ8dgx9vxzSrsBSuj4yiC5TdbgswOauMDa kyISw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=Y0N7oM6dRDQR8Rmd/jesZW+rQHwZCpQ3qcTW6TwuJ Ys=; b=Bk6hzej+JtMyUT+mdvkAp7lojXdG0saAcMI+sUqDu/nfdXbCMJj6XGLKz 2uNxsYAFXt9qIpwmNVNyXgCCxQryjKXUxPmc0qAJK1Jepyu9cy4XJpKbjpBU+e/c cNxUxgagRZN3Vymtku4IC879wDo7gEYQSNtse6uhgTtD4W/e0YuZFzjAimCEEr+J fLHZr8QV0Cwp5H+Z8TqQyxIGV11f+Qc7laZJtKlUal6XzspVRvWvG7b7Iww+yRt1 lkQq1UGyNmq3DtWi89rdFfNMknSqcCX3d2rVg8APrhtJIM4jShHFwxNOAGD2vvWO 5aNwhrqlbwWOdHu8B1YZfT1bTuPGg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvjedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepvfhfhffukffffgggjggtgfesthekredttdefheenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepheejgefhudeffeetleeigefgheetveeiteeuffehhfffkeeuvdff veffveetudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 3 Sep 2021 11:21:13 -0400 (EDT) To: Maxime Ripard Cc: Chen-Yu Tsai , Jernej Skrabec , Rob Herring , Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org References: <20210901053951.60952-1-samuel@sholland.org> <20210903145013.hn6dv7lfyvfys374@gilmour> From: Samuel Holland Subject: Re: [RFC PATCH 0/7] clk: sunxi-ng: Add a RTC CCU driver Message-ID: <4a187add-462b-dfe4-868a-fdab85258b8d@sholland.org> Date: Fri, 3 Sep 2021 10:21:13 -0500 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210903145013.hn6dv7lfyvfys374@gilmour> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210903_082116_391416_75C9DEA2 X-CRM114-Status: GOOD ( 33.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 On 9/3/21 9:50 AM, Maxime Ripard wrote: > Hi, > > On Wed, Sep 01, 2021 at 12:39:44AM -0500, Samuel Holland wrote: >> This patch series adds a CCU driver for the RTC in the H616 and R329. >> The extra patches at the end of this series show how it would be >> explanded to additional hardware variants. >> >> The driver is intended to support the existing binding used for the H6, >> but also an updated binding which includes all RTC input clocks. I do >> not know how to best represent that binding -- that is a major reason >> why this series is an RFC. >> >> A future patch series could add functionality to the driver to manage >> IOSC calibration at boot and during suspend/resume. >> >> It may be possible to support all of these hardware variants in the >> existing RTC clock driver and avoid some duplicate code, but I'm >> concerned about the complexity there, without any of the CCU >> abstraction. >> >> This series is currently based on top of the other series I just sent >> (clk: sunxi-ng: Lifetime fixes and module support), but I can rebase it >> elsewhere. > > I'm generally ok with this, it makes sense to move it to sunxi-ng, > especially with that other series of yours. > > My main concern about this is the split driver approach. We used to have > that before in the RTC too, but it was mostly due to the early clock > requirements. With your previous work, that requirement is not there > anymore and we can just register it as a device just like the other > clock providers. That's a good point. Originally, I had this RTC CCU providing osc24M, so it did need to be an early provider. But with the current version, we could have the RTC platform driver call devm_sunxi_ccu_probe. That does seem cleaner. (Since it wasn't immediately obvious to me why this works: the only early provider remaining is the sun5i CCU, and it doesn't use the sun6i RTC driver.) > And since we can register all those clocks at device probe time, we > don't really need to split the driver in two (and especially in two > different places). The only obstacle to this after your previous series > is that we don't have of_sunxi_ccu_probe / devm_sunxi_ccu_probe > functions public, but that can easily be fixed by moving their > definition to include/linux/clk/sunxi-ng.h Where are you thinking the clock definitions would go? We don't export any of those structures (ccu_mux, ccu_common) or macros (SUNXI_CCU_GATE_DATA) in a public header either. Would you want to export those? That seems like a lot of churn. Or would we put the CCU descriptions in drivers/clk/sunxi-ng and export a function that the RTC driver can call? (Or some other idea?) Regards, Samuel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel