From patchwork Fri Aug 23 10:19:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liao Yuanhong X-Patchwork-Id: 13774943 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 CF903C531DC for ; Fri, 23 Aug 2024 10:32:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding: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=toT7Y0rXFSpz0QJijd+CyvrL8ZdHRq0i8XED9aPmhV4=; b=mLAdVWZRRPvNur5NEtTSs7TX6F Qcz7TDKaJCzSUTDC8JJ7iy9lwPft0dx1pbHy8/ASyuUTx9iILGnUcIuIekF1ejAP7yoSewm6oq2vn IsUDz9p0kwvvMlbfWnrTEGHPPLCXsoe5uSyzxkB7Pvqn5MibIVSZehdy0NdNFwMM5HUVfocPIE0lz lpTwEI2ByindhikWQzD7QP0GnMLzrAbmOt7bDeP1DxMpNcvUq67X+NcOXtyEv/3mqzYf0GbviJFXa hPafxBuhx1GEfK2vfBgXrTcsqcJhAg7qx3b25WdJE2f/wuP0qk0VUmap88HnKbRrUAHDpwPPlhgvm Ul57x+iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shRaW-0000000GLsW-3qCV; Fri, 23 Aug 2024 10:32:12 +0000 Received: from mail-sgaapc01on2061e.outbound.protection.outlook.com ([2a01:111:f400:feab::61e] helo=APC01-SG2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shROg-0000000GJ3b-2W88 for linux-arm-kernel@lists.infradead.org; Fri, 23 Aug 2024 10:20:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cGqsFhCIW95YGhVnLVYiBis6YW8dm0rJ5VLeRo3xU5qgiW/M8ycDcFbxtCeaHtO8eD/moCoCtxRePGbTUOgjp1YM661gRtfB1e1ZTaiYRYNM0VOV4T1re0bpq1ADbP0f6VpGo56fMeWGgxs1yKWrdjBxkmpgXNHzKBROdnb9Aa6FA8RiRx5XWntkpHS1TMPJ3fIrR5oIIkHrewI94BP+jbmI3lCIa57CmDTBH049Fh5CE33qKnYQD6vmlNIBWMyCVDugQ49orzcoGfIg/scXDRiHZBUTtKv1R4KkvdOQBG5UJIrwaismHY12OCqh/EMglnkZH/cdULKepM9XmF1+ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=toT7Y0rXFSpz0QJijd+CyvrL8ZdHRq0i8XED9aPmhV4=; b=fQ2w3468WNPNhittyW9r6E11dMGM/jyfSVT8pb/JM3lMu7z2Rk2Nt6tOzbhP/PxXGqylNIWmeC1MCN12vs/3cvNU72eTMJAk8Wexo9uLP+vQlD7blH9zGrEYJt6CYmOWa6tGZoSqnnuM3LKHUibixNtva/9Ae/nlw7J2tMSmScLNSieszH5Od0l1pNFsr2G68GnH1kG+EBc0DOXNywFL5tHcOaHoYRuGfqPAyDoouNqJgKBLSScPrzGrYds8FicgXiPMHtjdr4w8ca2gIl4bd3w+mIn1sErV+wQI67eJIqyQrmKOkzgZ+30o1dYGvUmLnrGQsO4FLq/BZPR5Oviu+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=toT7Y0rXFSpz0QJijd+CyvrL8ZdHRq0i8XED9aPmhV4=; b=PiG7tpIUjGxHlmIFM8pFaGI+cVDu82uUCvIjJOa6z9epH/I3y8rLoV7RqERmRG+gHItb1KE7DwycJDuRgWqShTpQUzoc/mhgVTQ27vp/nuDsZotbax/oJga/Q+RX4E4e3PN90P00TJRY+UiPyIGJDilLAzmJ2yxB0oOcGGrS9xtCgONcTL9RwOmjA3qqKiC4PK7msgEKjXPLRTNY8gRGYACbR4kys6RG0GZwAQPAv9rxiyaGae0Dp4gr6h1rNweP/CnGmj3s0y8YJQSblOTSLIq+hjocxYl/4KYUIAzyMnaa7WZ+YCZhPrzO2XISa03f0fRB18GrHI0GzMdTJLtdBw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5576.apcprd06.prod.outlook.com (2603:1096:101:c9::14) by TYUPR06MB5873.apcprd06.prod.outlook.com (2603:1096:400:345::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Fri, 23 Aug 2024 10:19:44 +0000 Received: from SEZPR06MB5576.apcprd06.prod.outlook.com ([fe80::5c0a:2748:6a72:99b6]) by SEZPR06MB5576.apcprd06.prod.outlook.com ([fe80::5c0a:2748:6a72:99b6%4]) with mapi id 15.20.7875.023; Fri, 23 Aug 2024 10:19:44 +0000 From: Liao Yuanhong To: vkoul@kernel.org Cc: linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Liao Yuanhong Subject: [PATCH 0/6] dma:Use devm_clk_get_enabled() helpers Date: Fri, 23 Aug 2024 18:19:27 +0800 Message-Id: <20240823101933.9517-1-liaoyuanhong@vivo.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: TYAPR01CA0024.jpnprd01.prod.outlook.com (2603:1096:404::36) To SEZPR06MB5576.apcprd06.prod.outlook.com (2603:1096:101:c9::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5576:EE_|TYUPR06MB5873:EE_ X-MS-Office365-Filtering-Correlation-Id: 9536f5bf-bf85-4ed9-47b3-08dcc35d1b7d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: Fb9EsEgdcqF3Wau8Tfbmop0VTbeclyhigiT6Ve6KeNHEh7t8LAMj92LEvcj3dYVMmXHHFZUCDwVIwzVjaNI+diP66ZoEYpvlRDldXsaC1nvMeGjBIRkIjj8fRwk4nl9lDY4Dy5g6T9brMeXAru8dAPR6ELPOrfVjRn0SmKP3AByjvad+5gUWRj+/tFPDz/DPthWcz7LOazwYz4uQYMNAqaQJ3F6CTM8Dr5xzpa49gJ6LZe7VI1CKQMYsXo7wPzOo4hGRTSjV/MaYz2NJmxqJkvjXPxhJ4EzLtuobLQC4NbNIFBuUYI4dqVzb0fMnXd50qrlgNcwBj3crUc+mDS3h9RKd446h1DLOkrw0ikBiw5Ibfi0HAkqLx33bojRlESD09g5GVyg1bUyYlPcRuVM4WU1dhrIj5IG+C1Ut2R2h5862jfRbyFJdOjn+cerLl9dhvZ+E6AwB94pn8G14bvhQjxPC6uyMvIN62T+3hcyKwRz6JPW4YOoSNgAFqetn2wfMAHweub5+bjvNN+fM3g3gC80CcYXmUbevxHO6m48JL6q8EITZMJne7xU6mIz2hgNyAtIioQ2x/XuHNzwNP6yUcNrmPyw674FROhpPTElwfE9R9uzjvUqBx2lvZpAbuyyguSWBux4tOa1IkGksu9kUFpxfG6DCYjJurv93bPlI9qNzAjFwZ4LKx1mLg7laut8LsCVer4V6VlIwMqgJEzXTwiogQ+94smN5VGK0N+QCGvEbkH2eqOGs6o1BZxp3SJhCgGFf2EgZn9l9AY3nrHtlqbYRegDG1SQgX1nGJo1Jz/62CXjyxFy8lfnlK0vp69cW7LxZNqZSrvfOxYHmUV3naoybbzdpWUd4WhoMJOoS99qpaXlz9BvRfQlZIvN9UW3vxDRRy8fwsmjwGy9QKhizXkxaJloiI4NQmitjwI4borM1/qR0pp6NDxLA21C7L3UmZPwRPAXS4kXAQL+IY3gIjvdmv8sRmD1CAoW+zHKvadcscrj9DoQJ2HeBU3i0yGiPIlI6p63FQyzWQIGBxj0oxgsPH52eKW5AFIZnwfEHSiEvArNws/1YAJWZ6YAk751R+JXBrfjOvjk+M5YYoq54IlvvZ7UPQ15EqJfvKkYXmq0+66Ll4rqpE/+YsUQsCkHh4MMkKPyTXO6Lxx4YV18tJ+yKpbn40BWoL+03CHjZ1vlT/2ES6mrXLPqW1MkDeu7DdMGgCVcjWki4sKdIxdBGnH+OtVCNarORJoRRfumkp9sLZGgwQqI3CbJxcvpMwCEsjvDe1kBR0K+nKjwX1NvzIS4PBUxheI04l0sm8+fYmGgjyRYlJLxiJEffh1RjMRgVKHd8RHhkmOYKxKxrBfIY6Dg39uk6MKgWDXh2hdpYyOAshL6HaDF62wFi6d+7dA9rbrR6BgLIPhkDUmCHaE9xIg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5576.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101; X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P8QfyRXWcXjWOYqAbT85KGRJ0fEgeB9pChadcw/8FuKHuVvdhsECDI1nH+2OX37ozc3EA72saflR/v1s8tylH9llOoT/ERwLkXhXDXNCoBt9SR1TKM2SKAJunxVZIN4dJ/WsV6eJ4MhOGMgkq8mkhOx+GqyxH2rXvr0lqhqObVQnqEv5LoALeeRtXfWgaAwWl+Q4OIIMa3lhffEo79PJ/SSLmmyeSRfqFQTD09BZ+gMdrxMoLXHpov1dMjWZebvZeXFf6rigrJ+Db7f7vRt5spfzfD0kcWEsN4KtXbLD5V3WUEIzCn7MaBqA6XpmXww+kP1JjYidhg3JF9qIZCcK7HCYkRepgsG7Del23wDCUrfr0S3bAM8r/7FlqeLT7HOuY9d9Pj2U3g7XCqslp2RI7hajx5Ob/JWwYZlZqVjBu/iBWc+DjT5UQCX3qPlAkTUOAv7EMM442/o9Ip280onNOkFPcCQFAqmazNPxXGaOq3PyYzbWyWb5xgoZSF+U7lXXFV8JlJxwQtL5hoYZYE3YIPicSdqTA/mFj0FS1Kik+nqgQ5w1ejpgnThFUGdpWg/Foh67PG X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9536f5bf-bf85-4ed9-47b3-08dcc35d1b7d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5576.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2024 10:19:44.3002 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: k87pS+b5jg9kSEqMhMW4R/JYfZ0KMPY59WmOYlyqMELKsKD9FHcFvQzmwH74LPs19N59EiiPmmOGyUnUdPFTog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB5873 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240823_031958_882355_64FA5ACA X-CRM114-Status: UNSURE ( 5.69 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The devm_clk_get_enabled() helpers: - call devm_clk_get() - call clk_prepare_enable() and register what is needed in order to call clk_disable_unprepare() when needed, as a managed resource. This simplifies the code and avoids the calls to clk_disable_unprepare(). Liao Yuanhong (6): dma:at_hdmac:Use devm_clk_get_enabled() helpers dma:dma-jz4780:Use devm_clk_get_enabled() helpers dma:imx-dma:Use devm_clk_get_enabled() helpers dma:imx-sdma:Use devm_clk_get_enabled() helpers dma:milbeaut-hdmac:Use devm_clk_get_enabled() helpers dma:uniphier-mdmac:Use devm_clk_get_enabled() helpers drivers/dma/at_hdmac.c | 22 ++++---------- drivers/dma/dma-jz4780.c | 18 ++++-------- drivers/dma/imx-dma.c | 38 ++++++++---------------- drivers/dma/imx-sdma.c | 57 ++++-------------------------------- drivers/dma/milbeaut-hdmac.c | 20 ++++--------- drivers/dma/uniphier-mdmac.c | 20 ++++--------- 6 files changed, 41 insertions(+), 134 deletions(-)