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=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 67E92C4338F for ; Tue, 3 Aug 2021 10:44:08 +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 2E42A60F93 for ; Tue, 3 Aug 2021 10:44:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2E42A60F93 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de 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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CBQaMcmcLai7Qc1FT/dA/3bRHPkW5orrbY2g59QdczQ=; b=M7rkByZb8L8D2ermzMUTbJeCGY LIsRR3By28Lldw4bxhkJsSeikM3DNxr+Gq5ga2a28wrCVa5fAJrfHmhC66GqERrJmQ2ovpW29+MRG JLoL7idhuK1I3iLaZu9nFXEyDkGfNRtY+PVuWsA4uO+3t8d7vUEbCcvO6qWLa9qHUj9sVN6niGK55 SD11TdMylKxjXfCKwjiczBbR4gt7Bn3yZzOZe4CiNgj7ODx+b/rH2J37CjGVZTViokZT/eY7R1RkA mqBGJ6VrFh6pUn9ZCRfKdkELfjkkJs6JV/uXK7nQ2uNz4ZYVPdYrDkMrD0L9AG2gAYCzfdwS+V8AJ AzmfcM/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mArrw-00279D-QK; Tue, 03 Aug 2021 10:41:58 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mArqQ-0026T4-7b for linux-arm-kernel@lists.infradead.org; Tue, 03 Aug 2021 10:40:24 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mArqL-0000Z2-TR; Tue, 03 Aug 2021 12:40:17 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mArqG-0006N5-So; Tue, 03 Aug 2021 12:40:12 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mArqG-0002vP-Qh; Tue, 03 Aug 2021 12:40:12 +0200 Date: Tue, 3 Aug 2021 12:40:12 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Stephen Boyd Cc: Russell King , alexandre.belloni@bootlin.com, Michael Turquette , thierry.reding@gmail.com, lee.jones@linaro.org, linux-clk@vger.kernel.org, linux-rtc@vger.kernel.org, Ludovic.Desroches@microchip.com, o.rempel@pengutronix.de, andy.shevchenko@gmail.com, aardelean@deviqon.com, linux-pwm@vger.kernel.org, Arnd Bergmann , broonie@kernel.org, Jonathan.Cameron@huawei.com, linux-arm-kernel@lists.infradead.org, a.zummo@towertech.it, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, wsa@kernel.org, kernel@pengutronix.de, akpm@linux-foundation.org, torvalds@linux-foundation.org, Claudiu.Beznea@microchip.com Subject: Re: About clk maintainership [Was: Re: [PULL] Add variants of devm_clk_get for prepared and enabled clocks enabled clocks] Message-ID: <20210803104012.wf2buscbukxufesl@pengutronix.de> References: <20210723091331.wl33wtcvvnejuhau@pengutronix.de> <06e799be-b7c0-5b93-8586-678a449d2239@microchip.com> <20210728202547.7uvfwflpruku7yps@pengutronix.de> <20210728204033.GF22278@shell.armlinux.org.uk> <162771727997.714452.2303764341103276867@swboyd.mtv.corp.google.com> <20210731120004.i3affxw7upl5y4c5@pengutronix.de> <20210802094810.GJ22278@shell.armlinux.org.uk> <20210802152755.ibisunvibmwhiyry@pengutronix.de> <20210802163824.GK22278@shell.armlinux.org.uk> <162797831443.714452.3551045763456936564@swboyd.mtv.corp.google.com> MIME-Version: 1.0 In-Reply-To: <162797831443.714452.3551045763456936564@swboyd.mtv.corp.google.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210803_034022_355143_1000D7A3 X-CRM114-Status: GOOD ( 39.57 ) 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: multipart/mixed; boundary="===============5223917978780472473==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5223917978780472473== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jsnx7dwxusk2t7bj" Content-Disposition: inline --jsnx7dwxusk2t7bj Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 03, 2021 at 01:11:54AM -0700, Stephen Boyd wrote: > Quoting Russell King (Oracle) (2021-08-02 09:38:24) > > On Mon, Aug 02, 2021 at 05:27:55PM +0200, Uwe Kleine-Konig wrote: > > > Hello Russell, > > >=20 > > > On Mon, Aug 02, 2021 at 10:48:10AM +0100, Russell King (Oracle) wrote: > >=20 > > > > There have been several different approaches to wrapping things up, > > > > but here's a question: should we make it easier to do the lazy thing > > > > (get+enable) or should we make it easier to be power efficient? > > > > Shouldn't we be encouraging people to write power efficient drivers? > > >=20 > > > Yeah, sounds compelling, but I wonder if that's of practical importan= ce. > > > How many driver authors do you expect to lure into making a better > > > driver just because devm_clk_get_prepared() doesn't exist? In contras= t: > > > How many drivers become simpler with devm_clk_get_prepared() and so > > > it becomes easier to maintain them and easier to spot bugs? > > > In the absence of devm_clk_get_prepared(), is it better that several > > > frameworks (or drivers) open code it? > >=20 > > It probably depends on where you stand on power management and power > > efficiency issues. Personally, I would like to see more effort put > > into drivers to make them more power efficient, and I believe in the > > coming years, power efficiency is going to become a big issue. > >=20 >=20 > I agree we should put more effort into power efficiency in the kernel. > I've occasionally heard from driver writers that they never will turn > the clk off even in low power modes though. They feel like it's a > nuisance to have to do anything with the clk framework in their driver. > When I say "why not use runtime PM?" I get told that they're not turning > the clk off because it needs to be on all the time, so using runtime PM > makes the driver more complicated, not less, and adds no value. I think > some touchscreens are this way, and watchdogs too. Looking at the > drivers being converted in this series I suspect RTC is one of those > sorts of devices as well. But SPI and I2C most likely could benefit from > using runtime PM and so those ones don't feel appropriate to convert. >=20 > Maybe this series would be more compelling if those various drivers that > are hand rolling the devm action were converted to the consolidated > official devm function. The truth is it's already happening in various > subsystems so consolidating that logic into one place would be a win > code size wise and very hard to ignore. >=20 > Doing >=20 > $ git grep devm_add_action | grep clk >=20 > seems to catch quite a few of them. Another upside is that grepping for these drivers with a potential for further improvement become easier to grep for as devm_clk_get_{prepared,enabled} is a much better hint :-) The changes to these drivers probably won't go through a clk tree, so adding these patches before adding devm_clk_get_enabled() would only help for the warm and cozy feeling that it is right to do so, correct? As my focus is limited to (mostly) drivers/pwm and I already have quite some other patch quests on my list: So can I lure you in merging the new functions and I will create a kernel janitor task to convert more existing drivers? Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --jsnx7dwxusk2t7bj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmEJHQkACgkQwfwUeK3K 7Al74wgAkhpu5oiH9zXF7yver2FOhm5lA/whLWxAmSyiMUqAURgga0ZHZaA5jSfS V47S5aYg2PHTPQjHsE9vffbXZ1NfmE4t+XsY/9hn1EaGA3yrwCfxF5oFeTqZnP+D AJxuot538b05HhV1MY2TDE/MYs7XKlKzT/BzfI14JPKIAzdFpTu33/XNNocLBs3M FK3NlL7d2p7tynJYDE7WCTsBH8r+k9QJmwSVl1GB8xTk7WOwEcPysg4Ts3aO5csk 02QFW6StrFEYfMKMEPm6uf5PX0Y4G4es8MbCpy+3pU1UXGojQcRvp4ocPiszpYFt mqFFq7f3cn4PK8GIh5GncnlWzh7DeQ== =THuX -----END PGP SIGNATURE----- --jsnx7dwxusk2t7bj-- --===============5223917978780472473== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5223917978780472473==--