From patchwork Wed Aug 21 12:10:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lei Liu X-Patchwork-Id: 13771294 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 B7AB9C52D7C for ; Wed, 21 Aug 2024 12:13:07 +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=2eO8g41SmChEVVtvsEMlH/306qrkyLQvlueqrzwfRgI=; b=BlcCPYwzNdg0k3 NRXrSHZNrXLg22MygjWnLm4wfhN3iyCehbOZEnfyGb+ewvrZNzPLQg460TMWB7rbWAINS3ysuxAsw nn1GT0KUDPo1gCnRVgawN7rYzWnTTh7bbfF4JLbgKxwNEOnF8uHgB1u5a1Uq1f74S4JuQ0DC6ahiL JbBRT2VKtVvjGst63zLi9pPfWLfK2ZBMxcOUX9XlGbOLrx3lxBNvV7cbtfj5wk3T5BtR5VMMNxTY9 HcjNiieBF00xpRWAGy/37poYKPkCm3cQWLXOD2jZ4hH0bGk53Im9rI4x8VyBfeTMT4HA0rI6YHmlq f9wwldxJWgF3KALGgjOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgkCz-00000008rmz-2uCP; Wed, 21 Aug 2024 12:13:01 +0000 Received: from mail-tyzapc01on20601.outbound.protection.outlook.com ([2a01:111:f403:2011::601] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgkBM-00000008rJM-359L; Wed, 21 Aug 2024 12:11:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=V+10a1hFml8nd0/0Mrv1JiT+gCyTEY3tY3iREkc49jofzvgkkcodJ6cyUGGgH+P45DdRWq1zVrOlIxviZP/eFOcdfT12Oz2Q44tsKC65SFxbRoHMgdpvJ1yssw6ShUgWi8HNIlF/X+lspWWHNtodmqGwwMMT2iC8NfG9lTs/zeC0HS0nIxT39uJXHfFfQ1ZinBPIjVemMWwq0KC9roeKG018N6WK3jH7kMSNYyJ5HtuLEC8xTHVaT+g78wa1A3eXao35r78nM7XInMmtpjscPiUu5ndHg3/h8eEetVIxpjRL39+xVX/unX0KjCXhwfePnmlzUrg19aiZfDHQlQdcyQ== 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=3f8HS+mvtUMnxTmPYwwLk1Sfi9r2R8FY91CdfdmEm/g=; b=R+yWzeEABG89bH1J7mk0o0LUhb0SiiyVjhNPU+Q6DdKcFNAzVqCcRWKriMiVQLU3CSXnW+d5MapG1Z28yaM96RZ5A8X7Am3imIAFvOcVoflLrTGp2PETKhWXKfQRsXP/stbnomchQ4KRiNmr7j9wonDywhptwi0B+zO0bJZMsg2otPDSi5sVGuHsU3sdPYNwTUoXg+iTEwriR+XYjE4DRd9H5wJueU22ELneT+ri+yisGNmL1GgwIB1cSWvkD2hmftMqFe0qHgUE4npENjsltkz+mUIKoUtSZVbWcdswzU4kmP44jbFPrA5T7zG/A0Q3YEyT5dJj1tFfs7a9LeeCYQ== 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=3f8HS+mvtUMnxTmPYwwLk1Sfi9r2R8FY91CdfdmEm/g=; b=pWKcRnPSxkWM1upj5nZaI64ZRxeFEYqHnI0kR73iFCSUkqDIxib7XGSk15KBVkCHfdyHX0a1vyFAdeAt5UTG6k4YYty/cmApSH1rpJJEUAngZYqsKRR5hV9LWrFxvsMSnzr5VGqDhrUloTJ2jgLt8veLdWd4pxQfXuEQNn+46g3x/2LfD9wiykl0QbAFqzQpou5T6gOEiaoVqJdtBZ6UhPI8ufWwkwiS6/n5BOVtJrUq3rSYfPhLiImcuOqROzNEl5AdDK6tS34Ovct5QkYH3nYXc/yrCGXqL7Y0Jqhu7H+HRrSMtOvOjMAziG8flgE3Ajf2kywDmbyuUADHxCXgLw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5624.apcprd06.prod.outlook.com (2603:1096:101:c8::14) by JH0PR06MB7128.apcprd06.prod.outlook.com (2603:1096:990:8e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.20; Wed, 21 Aug 2024 12:11:03 +0000 Received: from SEZPR06MB5624.apcprd06.prod.outlook.com ([fe80::e837:10e3:818e:bdfd]) by SEZPR06MB5624.apcprd06.prod.outlook.com ([fe80::e837:10e3:818e:bdfd%4]) with mapi id 15.20.7875.023; Wed, 21 Aug 2024 12:11:03 +0000 From: Lei Liu To: Neal Liu , Greg Kroah-Hartman , Joel Stanley , Andrew Jeffery , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Conor Dooley , Daire McNamara , Bin Liu , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Lei Liu , linux-aspeed@lists.ozlabs.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: opensource.kernel@vivo.com Subject: [PATCH 0/5] usb drivers use devm_clk_get_enabled() helpers Date: Wed, 21 Aug 2024 20:10:38 +0800 Message-Id: <20240821121048.31566-1-liulei.rjpt@vivo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TYCP286CA0069.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31a::17) To SEZPR06MB5624.apcprd06.prod.outlook.com (2603:1096:101:c8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5624:EE_|JH0PR06MB7128:EE_ X-MS-Office365-Filtering-Correlation-Id: 15a280f8-8c58-48a8-fd8a-08dcc1da534b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|52116014|376014|921020|38350700014|41080700001; X-Microsoft-Antispam-Message-Info: 4FkJamL3+5OJCJu5xm/gn93MWuhd3WD5BbnHNiVTcVECFaEdkOOlDb+prUrHH+TvSNAo7Eyndq/E/kh2M50shy/0oFxMq4muHiGrI1WHBA3dZhneNWfqLCN7NNdv67Q9Y36x5gPrpU0QObk2zyp9uw0iX4DCdUtHHPEZam+hbY7UlXWGTb5VHR+2rTIb16CmC0uEY8eSYaNHJ1Wcx1nUSnuTNaAP6PeAr9i9V2q/JvRnzChYS+5kTYAvLTn9AvOKALk0O9RcIvKjSO/+f7TqMLXOtowEGLXY3kg0i7XXHmA/1aB1uxXvAYDOpYxb8iRgbuJCqciCvb7NoFEXX45bT3V+ZNKpKr/MidYxURIfvmp9MVxc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V7rDc416yElkpqPOmkn2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5624.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(52116014)(376014)(921020)(38350700014)(41080700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2kHilz8LyKbRT+2fxMwbCm0AtYqQZOJLUxZ4QgWVSJ31FS/XmGB0yGEAfvJx4rs4OaYzb3Sbfkw4/uGjX4Q/rBSTzrm5RmBrss9aGXDM6/zsqZG1Y9Cz6pFIBIl4jdBMuwyGydJv+jOB4QqDD7rGclYsGyHxhGPsRkX320DYl/K8qT5IyzQQHW1nYQF030lgHOQ2GWTSJMK7TTI9l1KZhzgN5G4Owm8udoS1jhnId4OL48HvH666WFFYWlsSfZLgVxMdkskXJ3V9fQ0spi3VHSRgkH+R4/57u2t1d9KHSG6XvirK6GDe/jpxofifx8H6gabhBbsboS53m9HVo47ssw0fOhg2oRNkKfcDKrIZz3+Cr9SzkHtjRuEDUMLJ9ogo1wmQz8Xv2OovNXHIGcaTMnqvqFFWXVeKjMu2e6I84kD/AbTL37uKVUwb5uDKZWuB9o5sHHwWa69wBwCm6WqF6gXlrx0WrxLrGi3ial7Zf5pC3k+iqMZ9Qc3Ry5uQFyf9LLgRkuaGd0hkJc2bNo3UJkoQcMqU/9lXIDbH+gwXKECUnUYw9+2kfdnam7fobNuMwp15pZQ70VDedlIjXsXfm3GaGkD/8XdFH4+r4ndu6jvJJO/5fOnteL4Ot1VB0HglSqXGCbbag6UuVE0fG/hmkVHHZCM8CFWT8q9+fd8GJ8gKp8vU37tQZFBdr8DWge3K3lxULRrfFnRbsWx/HXUvXCGoFQOAOBWKUwBdtkt0rIQ3Nq2KX0XSs30zUXIAagH6h0BjDBhDns0PCTuvQifG0brJeVaXg9qoKwYMTAoBqP54C4mSDlcOSRgWG/iy8aJ7L6/hiKLYFLCEiTTvAWA1P+a48ghRvHgLHAcmrm09h8K0zLOFOgK+9qoEJiLYyKRbBYnRXGW4fmkWl54C+1mmeyBV1nG5WwyMAcM3gZbrBs0NCPsPli9caRJKhFnXZcfjYI46IAe1KSUKe0FCI92BEf8WgRDzIBES9IIM0ZEnDhbVDiUgvd0PkMV9eOtBfj02wJUvG+W6/foQepXUaEgYdStKnLDRqAg2AOnv6wkcFv/mpbUxVmjljoQwdFYD5NFBv1uYji4HmR9oX5A++GAfiy/MIouNuJb+V+xAmI6YZNDfQIKwPdX9+/IXnHy7YPaZfFZLR5netQtDYkWtfzrfRfOtqAqNhMCNrjW0Ca8oEZWKTUn8lsYl3gzPCbz22dMQHpSpICXnrLyiMuJIQbVBuWkQ+MtryrUSYtGLTftnDd6B6YPPRcP3ICOrIbJNjJ+CxKJVbhVN85olml7kHbo9b0x6aXhNVJ03IbYNh2LhxAqSVoRGf+aQ0EHusBnw2iJ9WqbjhnkUac0uATRUBBGMD0LbISYMX2dsJiUJpssDbunflyJmx7et9MEZvqH/Yc7nz7ljrujlfuKCRRsAFjiu4ml2ga7XsbQc2uLz2HGknbCNOk88io0UbwgkJknTU/XaZhTgNIkjwOmIFm+hbFW+/W2bUC1EhweVGukuPrPyqs8EkL7coLk4lnDKF2pbLsXnkSjlXV2NZNf8yhVbkInqBl8pgagSiJzW8d67DrZ/T+gIdlKKTOhAXF3ZKWe4qbGp X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15a280f8-8c58-48a8-fd8a-08dcc1da534b X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5624.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2024 12:11:03.1692 (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: IuOf5akIYo70LbSq1V116yL7QGIXTa25tk30d3yvtGBsIp/YGnDXD+NErQ8cHbj3NK9uWgD0FHSTkhlCyCqCYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR06MB7128 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_051120_857528_71D738F2 X-CRM114-Status: UNSURE ( 7.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=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 calls to clk_disable_unprepare(). Lei Liu (5): usb: aspeed_udc: Use devm_clk_get_enabled() helpers usb: pxa27x_udc: Use devm_clk_get_enabled() helpers usb: r8a66597-udc: Use devm_clk_get_enabled() helpers usb: mpfs: Use devm_clk_get_enabled() helpers usb: ux500: Use devm_clk_get_enabled() helpers drivers/usb/gadget/udc/aspeed_udc.c | 9 +-------- drivers/usb/gadget/udc/pxa27x_udc.c | 6 +----- drivers/usb/gadget/udc/r8a66597-udc.c | 16 ++++------------ drivers/usb/musb/mpfs.c | 22 ++++++---------------- drivers/usb/musb/ux500.c | 18 ++++-------------- 5 files changed, 16 insertions(+), 55 deletions(-)