From patchwork Fri May 20 07:57:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 12856443 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 38DB5C433EF for ; Fri, 20 May 2022 07:58:26 +0000 (UTC) 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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=i54pqJbRZF5a5CyPvdZD4cCoilsM9+irEfxl4pkxmcg=; b=XDPR7iJOtk1yTw 0UHaGNrw0fxTIW3pJSPzwqZhVbiYnJa8+S5GnFC3+ZauNXJt5Cij3dzZO1DbIvaQ/uEQQs2no2Dsx ZfpkhR3OeD6aHZ0493SYvQwy1fh7Vw0puolu28PdZwuTXRrHYZUZwC4lljcA3ojA0tm4GdlECs4Jo r1TC6oIe6ZS4hSin3hR+UzghKXhJwY4b0QqCxVdqGqVrkF0tT/mjU8fGmVyD3usXLdjhMtqXeAoXl g1NTNSowQ5zedOIQzidHzvl4+WsbDsPAZnFLVbb3MczwnRcIfr5VpoT8wdlgmt3VuC5Fz+hkEmNHl iuLVO0s0z2fbmEdeTsGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrxWf-00BAEW-Vz; Fri, 20 May 2022 07:58:22 +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 1nrxWc-00BACI-4R for linux-amlogic@lists.infradead.org; Fri, 20 May 2022 07:58:19 +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 1nrxWI-0006bH-3M; Fri, 20 May 2022 09:57:58 +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.94.2) (envelope-from ) id 1nrxWH-003ROu-O1; Fri, 20 May 2022 09:57:56 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nrxWF-00AveO-69; Fri, 20 May 2022 09:57:55 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Russell King , Stephen Boyd Cc: linux-clk@vger.kernel.org, kernel@pengutronix.de, Michael Turquette , Jonathan Cameron , Alexandru Ardelean , Neil Armstrong , Jerome Brunet , Kevin Hilman , Martin Blumenstingl , linux-amlogic@lists.infradead.org Subject: [PATCH v9 0/4] clk: provide new devm helpers for prepared and enabled clocks Date: Fri, 20 May 2022 09:57:33 +0200 Message-Id: <20220520075737.758761-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1942; h=from:subject; bh=sEhuMmJW8l03//A/Pq9UCpgGc389v3t6wXwl4AtmbV0=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBih0nW4RmK5Skbk1HhqzFWTduO8ASNdMPskUzcaNyF DKDG/iyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCYodJ1gAKCRDB/BR4rcrsCTC9B/ 9J9jmZqoBS7CZI8eRtCxLpm5BhzRPL8uY4LD07XNagLaYHx9kNRbQKyNr/W3e6TTxQDlSO29xUogcn NetIM7xPbD4dLe/4Z65dxaziw0a/j9YxEFOacX4DrnA3bvaVA6ML47qngWs9ss70L/sIOzwQGhhNzy KG1KT03FW4cANfcgaD+rmyCH7q+Fob/Les4PVhNKOY6O2O9kA2Ayf5bRoAdWs7U09x76iLuO2IqEmt /u0JKbEoFLHbzSy3rNvsb4Sz2qYFH5PzLvP0u0oHGSJ4P2Jqdi6qenBzdslpOHD/d6WVXYw+A/P1CX fHyHLW9F+naC/qAWydNC3FC18Z51R/ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 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-amlogic@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220520_005818_215262_9BD71B66 X-CRM114-Status: GOOD ( 12.56 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Hello, after Stephen signaled to accept the idea, this is a rework of v8[1] with the following changes: - Drop the follow up conversions. I will resend them individually per subsystem once the preconditions from this v9 are in. I only kept one clk patch that will go in via the clk tree anyhow. I trimmed the Cc: list accordingly. - (trivially) rebased to v5.18-rc1 - Introduce a new commit that first improves the documention of devm_clk_get() and devm_clk_get_optional() before (mostly) duplicating these for the new functions. - Make the new functions use a GPL export. (Note the existing functions use a plain export, I didn't change that.) - Drop a bogus empty line that was cut-n-pasted into several functions. Thanks for feedback by Stephen and Jonathan. @Russell: Stephen wrote in v8: "I'm largely waiting for Russell to ack the clk.h change [...]". Would be great if you looked at the series and tell us your thoughts. @Stephen: You asked to add the acks from v8. There were however only acks for the followup conversions. So no changes here. (Andy Shevchenko replied to patch 0, but his Reviewed-by: only affected the patch "iio: Make use of devm_clk_get_enabled()".) Best regards Uwe [1] https://lore.kernel.org/linux-clk/20220314141643.22184-1-u.kleine-koenig@pengutronix.de Uwe Kleine-König (4): clk: Improve documentation for devm_clk_get() and its optional variant clk: generalize devm_clk_get() a bit clk: Provide new devm_clk helpers for prepared and enabled clocks clk: meson: axg-audio: Don't duplicate devm_clk_get_enabled() drivers/clk/clk-devres.c | 91 +++++++++++++++++++---- drivers/clk/meson/axg-audio.c | 36 +-------- include/linux/clk.h | 134 ++++++++++++++++++++++++++++++++-- 3 files changed, 207 insertions(+), 54 deletions(-) base-commit: 3123109284176b1532874591f7c81f3837bbdc17