From patchwork Thu Aug 22 02:52:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rong Qianfeng X-Patchwork-Id: 821469 Received: from HK2PR02CU002.outbound.protection.outlook.com (mail-eastasiaazon11010039.outbound.protection.outlook.com [52.101.128.39]) (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 754641CF9A; Thu, 22 Aug 2024 02:53:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.128.39 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724295210; cv=fail; b=G9kfOVjQ47uJPRtRUvwEn+FZ0gcUacejWjslzUePkQ0FA8TwkLQcwYzepmmqtHkbVnZzSFYK94y2cS7Jde+1zACQkRtH/sJtwMSLZFsfDHPTFPn1qeN8Qyeruuqk5xcP0IvPllkRLuYQ9JMV9GjjkQB4XkMmq+Dj0J3DJ7jOOtY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724295210; c=relaxed/simple; bh=WZyz4atNcDdnBd2ecToK7tWTXYXLhKTgGMF9GhmuWZ4=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=IvtadTjHQvZUi1qy4T+E/og1Ln8b/hsesxhlbRJ6sEwX942o6uD40KPoRKNXau0NDU+sadiLnH86YRvSHUiLqtCQhfroZVWm3i6e2P+An1jhZ9SFMKkbjnAlBIbsDBDD7PEtXzIHnNSRuDvNuxaqgBD/2cQZhlYgjzDYP2KTOvs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com; spf=pass smtp.mailfrom=vivo.com; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b=ISduPb/3; arc=fail smtp.client-ip=52.101.128.39 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vivo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vivo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=vivo.com header.i=@vivo.com header.b="ISduPb/3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PVwKp1YP5VKn+tG6TynjP1vduJrSqw3VJ86nfJxMJIFuVOKfEIT+EpIr8Xa75OuXO0P0kGOQFnAgfz75E4+cLoncw7+HMp58dVcFcC3q+LHb8LlOj0Qq57eEZMm9hf9JT4G2UjbB0t7IOzzYK9J4g/gR9HexAfm6hoxtQaD7OLko/0rJwxVyvnmlnz4U+NkjBDuUorylfnEGgq3QMMMI5hTC/DxxKSnnBWy22n0J1hlBwWxS2HPdgRaocnXWC+tDSYcjWqwT176aKacFabPPmR9qsWZYSdFPOIuWZ1aU8IE8l9/IIHVTH2OJH4/N95U+AzrkHku1mQtu8V6Rqn3mxA== 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=aZIVcNmPijX4RAefq6+gZY+jegilvtRg2K2+GoVVBD4=; b=PkgwbVGivb9W0p6159AAv6oWuN1pmTQvans+osHGH6ghVrl34lXH+vtk3VKdaEFPwwXaJzcxohhsVGeeGJmvP2eGJgQJRM0l/k9KmoaSdnrWRDUgIn21A5NdLpwwipQQh5diA/X3+KscTTVjZnj74yz2t8mMQCWHYzCL4CwbWK2/wB0Zf/ASADd5e0sANsp393LCEAmgnWo/Zla6dnXWvZTMVgbrRrs7FnBfDafk7YDhNOxOrTKPY72S/stJouYiDV4wEhVIRpsLW92Kh4CWZkYOqP8orJJvZajimgkNtckj0wcokNbXh93nWqG2C+xYtTzEYu/lOcC0ArnlaREZmA== 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=aZIVcNmPijX4RAefq6+gZY+jegilvtRg2K2+GoVVBD4=; b=ISduPb/3stw1sAtQAk9dLkB8lif1Sj1xdAvQk4rMrPjZOEEWWEoJCsXBESK8egYe0KuqGF0nIkuisdjfJz+sXxsZjpSFjRTuZlWotbgLM3ZPgIkxWrbYn30wYlPVh5K6mPzehx1CBiJYMVnj268hXtgfsJIFhvroNF+0BE31Ho6HRFJAmxHMO/YHY2Ps31nUafL3DbiE+xda0ISV4yCPhXHYX9YNEbWCve3uBUu3MCZdh/Q1FmCD7ipVYgY6oDIFVR7e3VCniM7+QvrZfXaVQKPCCHT00e5Oykp0VSforPqZy6Ej0du0SbiV5OPmgyTPpO2x6469KvA4R1mZWs/hDg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SI2PR06MB5140.apcprd06.prod.outlook.com (2603:1096:4:1af::9) by SEZPR06MB6485.apcprd06.prod.outlook.com (2603:1096:101:17e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.19; Thu, 22 Aug 2024 02:53:21 +0000 Received: from SI2PR06MB5140.apcprd06.prod.outlook.com ([fe80::468a:88be:bec:666]) by SI2PR06MB5140.apcprd06.prod.outlook.com ([fe80::468a:88be:bec:666%6]) with mapi id 15.20.7897.014; Thu, 22 Aug 2024 02:53:21 +0000 From: Rong Qianfeng To: Wolfram Sang , Andi Shyti , Paul Cercueil , linux-renesas-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Cc: opensource.kernel@vivo.com, Rong Qianfeng Subject: [PATCH 0/2] Use devm_clk_get_enabled() helpers Date: Thu, 22 Aug 2024 10:52:56 +0800 Message-Id: <20240822025258.53263-1-rongqianfeng@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: TYCP286CA0280.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c9::8) To SI2PR06MB5140.apcprd06.prod.outlook.com (2603:1096:4:1af::9) Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SI2PR06MB5140:EE_|SEZPR06MB6485:EE_ X-MS-Office365-Filtering-Correlation-Id: db349048-4693-439d-f05f-08dcc25594e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 2d+fqEgV9WE6KcwSTTqaVN5hKqV1Ao16R/V+ghfWtu4C1mJYmy24AdTaXMMfKXv0QfpDqnLz4Le7rfrtJojgUC6X2wwD6JxDRjViUfmEyydH1PFe+IY4lbFW61WUf4Et2VYuAaiChlexQprcZIpUa9PrMDUWwd9CIsMjMh7cdhMIbsQdJdi/IFAN3HLk/Eaji46sIM+ORuJCQAgK426KYT5I7M8ZWn2/cclIMQMoZsjFV5Otcmh4TmoGB21bju3meOyOplOa2OK/rVFwxoRkrOFd/gKbnS37yxo5lLno6caMaiX4rLGgMf4GvjcJNz4lhpT9wXuCIt7OEyEgue0aGkSmLL66BhGbHmis6S2k041JiPi0Qm9/BbiLrCp6Yin64QHq3ncu1to6WMeqBAUX+1cw8Qb69d/0Oaml2Csp6ydNLBl9hmahtyn4nuw+PiI0jOgnsuKT94fPPnWWVlBcq3C5LtgCLlhuqOr6NvwomHh0WNuXjsq3v/ABQyG+6BJ0QJVGSfItUp3c1OuSOBIwl/tWXM65jXkAhpBjnrO0hnL6cD7VB0GR9a2E19U4wSNmB1Qv2qefjfioO99XAK6cU7EbZcJBJRUogAMdM8ZAPnyeUpeqIjEoItovsrhavbvoW5SlCT1F67IYhatX4qKUtpy9k49Og8Qia1p9leCYZsTPg+2SjL6fyRG6Tl5Qo0GnNjJ1XIqnsAjp8rF+V5UMrtEbwNCIz/imRWGZXYyVYfIQE0oVztm7JDfaqnGvt2/fnUJzvPD7ocH91ztmO8kUlzBPZNSkTDa/OCziboeaEovB0uJ4HBFHAxmlcsY2kiKTaE8hCJlVtHayo5XY6H2DWvmV+1YpTirF+xqH7oC2r2SlJRso33IET8HaUiFE9B60+l6gLZTP8RLx5ZTzo3z5bd2aQkT0v8bvQ/z9fporAJ2AsNPqJLn1b0nVrlG/R2Gag+QsktgeYWbXUBQx6E8o+7U70Nj+/ass4HHthwnCYGml1/QGZV8///HrqepUJ1i8FnWn0qRudtTmc+FFJVQXZwFSOKXbGzGuhmlok6BY0++dy5yKHGnLDNPA0HJ63PE5tqscte3gUP08LFsxs7CH+mg7I7IoQ3yyxZ9sWD8XNgJE8NPfGA/dkBghKxtyAlDGO+SohY7HkXvyGX0W3rqJ+XxODcSQkoYmEC3yOuJKtq0fR6269KiHAW3fis3kJKLpUjm6zI+SrznJ9NfDjAQ466WB8zpmHyj6PwpeKWJqgBxV84hJAHdRpLTtWjSwyt4eLwu+ZEzyT6HRlcsq5qigNhHr5uK6t04tfCyQE4O8qX4y2CQiCh5MGOjhKJnjccr8foU/z90/w3GoIXZeRE85jYtzAX67UX2ZgMFWjOOo6n9ZRAmqOB85f9/NQGLFESofKEStgXcMte5xsTV0LfjJgA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SI2PR06MB5140.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(1800799024)(366016)(38350700014); DIR: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zW30lK4E7Ne4GgKbJsLXK9IHOn9rKyfKExPSNcw2htLobxcSS4VUGT80FqIvLk9rPyWsXjYMte9l4fkGxEXhdUC7OJcy80aC4xNLU9keTiQ30M5rQ8itZOb67mQu32stZY1Zr9BN7c/BiTWiNEZAOMFpyWqPQr1Fe836aRX9ktjBNT80ofzdjvcmWS7PgMwKi7QFhmAjVQoOrZkyYxFItYdgytxZRSkp5Ton3R/hjV7rfNnIbXNU1j8UXpZqDs8IJ/fqlnKfzGiK+ujdFFyifEErxaZevHfeQRtfDBx2ZxLsyxh6HgTzQcAJz/fmrKUOMtMjowWkgJYpaAVd/ucnqg7JqatgO1AiKcTkrNV36/wzhOlhZb/JSLVN5W2WowSVIgIWsS7bgcwsz0Ry26J6x2DOzX+LuiC6hKxMjcZMuR+G2PbXwrdXo3DHqNBjhxFpvF0P3HBm2IUw+jBbHZwj+icRn8X3OZvyJzqaennfx/lYC75KEEMlqDZzhOvHymST8QPoMs3cIdAkTgfLSuUVi1w9IV6b8byy76c9AakX3seqjYZccLA54ebY16E9/NHoieJ3OTJly95wi4OK X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: db349048-4693-439d-f05f-08dcc25594e9 X-MS-Exchange-CrossTenant-AuthSource: SI2PR06MB5140.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 02:53:21.3412 (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: 6xa3ICYXzPMk2/D3Aa4IXlSCPKoyUcrAAi9VvuW4vEErGFnAOTn0/W5Wm6ImbETkcneKPfwgL+O1U3oPWnSCLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6485 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(). Rong Qianfeng (2): i2c: emev2: Use devm_clk_get_enabled() i2c: jz4780: Use devm_clk_get_enabled() drivers/i2c/busses/i2c-emev2.c | 17 ++++------------- drivers/i2c/busses/i2c-jz4780.c | 21 ++++++--------------- 2 files changed, 10 insertions(+), 28 deletions(-)