From patchwork Mon Aug 26 11:29:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lei Liu X-Patchwork-Id: 13777681 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 DA855C5321D for ; Mon, 26 Aug 2024 11:30:58 +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=TrmonIJ0XhGWoLxkWnMroHIxfFVA5XF1UeV0wFQZXgg=; b=E4sBqyU4YX10j56I7NASMJ62Kb 1Icf3qkFtnGGBeTiODwR3wJGpXTM23NMp0Ko26nGK37zCv0x9ZUeUolxD1hp/SON6P+ZRaIzfCUio riyPNfW0avtvWV4Vw/98d9AdHLz+5KPAgHSn2Nv3nT0vgH5nzhmoExJaDAapFD9IMiBtgwKreMR/j x78/1uCxZzkW+M1q88ZzXgbQgQu6+3B6L6K3gLOtCvHFSL0A33SqYzrxBUGdfvA+KWd92nqOfM1np R0NGiYVUkn/o9xNdEZujHLVzKElgBEjrFnG3sdVO8VWQM9rbHVcDub8kE2yi+y+Vn1sayV7tfW1PD 8psxUZeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siXvt-000000078jn-3TAX; Mon, 26 Aug 2024 11:30:49 +0000 Received: from mail-psaapc01on2060b.outbound.protection.outlook.com ([2a01:111:f400:feae::60b] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siXv7-000000078WT-0cLS; Mon, 26 Aug 2024 11:30:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wIf5lgzVtPwop03+ZLoVEe5sLgyiJncXU54pzAEWBpzTVpH9KjY+o7sxR7KqNT+A1poXByRpIfE4+V/NyBeLYaD3KXOOC6XGiVkAbOzSgS88Pq/oj/EnZoGIY69jEw/x0xrpCb2IpHASZaI1zlNuKClYBDdqrvJUy70vshBJ3lwe3t89AQc8HVuR0RgtiNd834O4Xi6IfAOqHkBE5SEzzpUcl7uKvF41caPLH+Ne4/3klVycoduk9LO0oBeVgOAbzo2KnB1iHad5mL4JERAB+dljG4gE+DmBX/S0O24JZkNaQC/DSF4ebpSQVhYod+IFRKvuN6GhoCQrxE3Yi6oVbA== 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=TrmonIJ0XhGWoLxkWnMroHIxfFVA5XF1UeV0wFQZXgg=; b=SBb+zUIMRTT3t2HVDlXe8PckxKXtRwtIquXL3cUxO0N06hKJFHZiyG0mYhn6s7EVn73yaETtxfItNpU2T3YB9hMsVPYtexnU8fij3X9WIlFt67gX+5nT91LPBll/Vd353t2NOLyuHKcn21Y+D1akf3e8/wjzUgTJeeNMZKzM5awJQlr19GP4456U8BQlIMz1h0GgG4CKb83VEIVJ6zVE0GIs1Q1fPO6dkciAPi4/PmOIscCeLlMz0qb+1EpwFpjwngf0zq9Qr4S+J49aqjjmLanTY9/QSTbmvnfjvpQMc176ogFQ1Wz5ITNVCj4CG2a1k0ZnG4NqTZLHbIThc/Daew== 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=TrmonIJ0XhGWoLxkWnMroHIxfFVA5XF1UeV0wFQZXgg=; b=oeYVaex1F0giUIoVAvBli+9YaStSRRXn3zcV10y6GSjHXfRt+w8Hh7uPPnfw7CGdCSrO7c801YOza8OG5lHQ2Ia24Heeh+mKmlS1gNAIgrMi6zHmAuY7uOCneaEDdk3k8YLyMY/9t6CDDANfwxIZZh3uBfacMt9BBvnK3eWxeuhpjyTqA5sH97sXY9LI0UP8zRE7l3P1LKeoBDd4nYPpo0STxCjk+aB45tC2iyRgkwYwfVHwTumpZsUf4xlgXwnFS3ikB2sEjQI1QTuRg3fycj8B07LhL9chqz8AfHiydWS1548qv7DwqqtQiFgQSBEjDVMA/cidYVSIdQcmmbZ9yg== 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 TYZPR06MB5929.apcprd06.prod.outlook.com (2603:1096:400:343::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.24; Mon, 26 Aug 2024 11:29:47 +0000 Received: from SEZPR06MB5624.apcprd06.prod.outlook.com ([fe80::e837:10e3:818e:bdfd]) by SEZPR06MB5624.apcprd06.prod.outlook.com ([fe80::e837:10e3:818e:bdfd%5]) with mapi id 15.20.7897.021; Mon, 26 Aug 2024 11:29:47 +0000 From: Lei Liu To: Paul Cercueil , Greg Kroah-Hartman , Jiri Slaby , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , =?utf-8?q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , Maxime Coquelin , Alexandre Torgue , Andy Shevchenko , Geert Uytterhoeven , Lei Liu , Florian Fainelli , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Sebastian Andrzej Siewior , Jeff Johnson , John Ogness , Thomas Gleixner , Valentin Caron , Lino Sanfilippo , Erwan Le Ray , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Cc: opensource.kernel@vivo.com Subject: [PATCH v2 0/5] tty/serial drivers use devm_clk_get_enabled() helpers Date: Mon, 26 Aug 2024 19:29:25 +0800 Message-Id: <20240826112933.7249-1-liulei.rjpt@vivo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TYAPR01CA0152.jpnprd01.prod.outlook.com (2603:1096:404:7e::20) To SEZPR06MB5624.apcprd06.prod.outlook.com (2603:1096:101:c8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5624:EE_|TYZPR06MB5929:EE_ X-MS-Office365-Filtering-Correlation-Id: 35468fd4-fc70-4152-2ee5-08dcc5c263b1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: cWdB5Ds7tNej+/BEXCLbnsRjs7rehRsSGRaM0inUYpMli5IE55oPkFDDIdY/32YD3y8T+CeIjaJ3ciAkzLA+pwGzC6zVGljOPtyxxj0mcRuhzLh0M0c/XtR3vg+9ZeP1AzVg/JpR+eIfec1QX7/X1PBafDeU27adV6KFTEPw/hrhoGddKWj/1twyH8oLnpRM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b0GVW4nmQlWSXQ/4wrmPS7YnD0HZhpmsF7iSta4VQ6up/NfgKWZnTqssOmO/SC78qqv59GjJgEQydMTeFRf8hojtZP89tAqSWwu8/7kw5kvEQ1k3gAEi+1ZBJj1LuEkYlTPTCBoEvTJgffF2gtMrDvj5aN5R+Gfq5WG4SSe7yzEfTwtMhIE4yPoiVLWIfJYu7sic= 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)(376014)(52116014)(7416014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IpLScAg2XP9SpOZruiPf4L90F5wjZFhk+4StJbqEOYqCqF46ANEQd88Cs4yToTJhA0Fehf2u++XOtNP2RwOII09zyy6/7Uw4CSiIXuiKDYuKKQ70MFqUuY/wPxRUGvnMZJQMaibQqv4BJW+ZSobJweLvEzJCXuCAhpA8H0pLhRIRM87NEZ3wacoEJas3qHzVI+jqxW7mx98K5DzGbFH9nRB+kyHPlulEDr6f7g6vPUO+qg0ROHEG/tNwxWpvvNUVZKOCSwMpu78svJ4OTRgeLqMxzIy2hYkZko7Or95+Gp+tXytGuCjniDxwZGutBPotp36GM1JOoKpjhgISp4hMDrxRhGuGZsdtnaUoem4TMAHGchOlsBiZgnpW2f9tq/LKmL0pjXBos+omUGnj/lODyfrYwghEfqKVEyzFqnGqrryyfLJXpowBHiNQqCvJEvddohDiKjxHoYBV948dT9iQ7KAraQJ/nrlnQyBqVbplFA2wLa4IB8+DPQFhbriQnGX0MQ63CPxNXfqEeklJ5xGdmnfhXc9RTksJ1zIYkVySudYrfVeyLOP++Txo71/hiXpz8nw9NG8IEbbGq2fHpEBIQ3R6rxOwVlChzYhaHIvkN/Yl6KaMM3khm+d/txuoRaR1owN5SoCi0r6zCYVlMZw+60PADhQ4i3r2lIwa3qblz04KDCZ8LWb/fMhuiSU6fNuoRGAZd1RI1OIluj8ssJzjiiWonCJ2jFqyOnJXj/qT9E6MR40mkRUF82FpLzZdLHmg1VAP2bbNImGuLlFzKd5whUg0OmAmr3OJsplv258JvTzTAeQ+Z8slaIOABORK4iO5UJDuO4hdOT5rUQT7kMxzFzfpoB/D0BNQeMlDZf13dGeRucR59CFJnJYuYMsHSa2ABRKBYBs1XiiSuXis68ISmBGreRRxZQzRZBUztwstFqDYZiBt5XCFTBwEjh7YsADnxBcGFySyeTgavz4m6vZfjWWyKE314D2ScfNatq5LpLK1pNfxLqO0QLxEnnglyV8Yia9Mt1YgZBNDp2/uhtf4a1qz3MZRjdlM9yzzPkKa7Bq8T4riqXq6kNdp1PxafhvWgmnW0ff+ef2lrPjWB9fL9dTztzdUhXZ9fNW0gGs3P+kprgDqtyjY0QQio9oGP28Xy0bHZwAFlevk5AL+cmE2fBQAK0vaUYukjG3dhIEMCwqh2k295W32IzrqLIlVSgcy0WHTi8HfJY6eRLqkVMkI74wXVIU9CuAJd6y+mZmErtMytql2O/+mXu9ZRA87k9ELizoYrxBqKb1TbSDG5vMNH879NsjOxrokbXMYqmQqnhahI0EadQ9Xz3TbjvLvW4OYJuG3jDQvOre/ggd4NnoibMzvMWDW0WdLMxDDuvVG7zqFwfzqy84tPMiH9Dny5/U7Fvn3jkntWVJSv791buQhp51b1/fgWD7qT6D/6vaS+rhuwAuksYAJbLucE2fX8wO/mCxNTBttwhDY9kXvCBCvQ1r2p3wbdTflsvjzwSLQHpERKav+rw0byUtgBT5IFBuhfxwPtlJGuMqw7IrlKKbkwqLeg3qdNrv0BE25d6nwZr9fvoNIJWrvByGKvf84v2nz X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35468fd4-fc70-4152-2ee5-08dcc5c263b1 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5624.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2024 11:29:46.9021 (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: c8iwtS+HKU6OS/IpvjYwxnkdI5uNXzUhBwcA5wIbwL+XSYVOI6BhwmBzM1W7llP8w3oz58I4aiajymRipXFHtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5929 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_043001_215716_CBFB80E4 X-CRM114-Status: UNSURE ( 7.65 ) 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 calls to clk_disable_unprepare(). --- version 2 changes 1.8250_ingenic modification directly uses return data->line 2.8250_tegra Removes redundant label err_clkdisable 3.atmel_serial abandons the use of devm_clk_get_enabled interface for this file 4.mps2-uart abandons the use of devm_clk_get_enabled interface for run-time issues 5.st-asc abandons the use of devm_clk_get_enabled interface for this file 6.stm32-usart modifies the return method and removes unused labels Lei Liu (5): tty: 8250_ingenic: Use devm_clk_get_enabled() helpers tty: 8250_tegra: Use devm_clk_get_enabled() helpers tty: 8250_uniphier: Use devm_clk_get_enabled() helpers tty: owl-uart: Use devm_clk_get_enabled() helpers tty: stm32-usart: Use devm_clk_get_enabled() helpers drivers/tty/serial/8250/8250_ingenic.c | 27 +++------------------- drivers/tty/serial/8250/8250_tegra.c | 12 ++-------- drivers/tty/serial/8250/8250_uniphier.c | 8 +------ drivers/tty/serial/owl-uart.c | 10 +-------- drivers/tty/serial/stm32-usart.c | 30 ++++--------------------- 5 files changed, 11 insertions(+), 76 deletions(-)