From patchwork Thu Aug 22 08:43:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13772931 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 28881C3DA4A for ; Thu, 22 Aug 2024 08:28:57 +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=QnxkIH2PG8maLFyO7YTxZN32TVuGJcY7aU36Cu/UmrU=; b=1FOPFj4eGgO8eH BIIZT0iJwm6yAIyLDPuBSLk83a3JT4BwZMS3TWvMbgfcTVTmaslBhiPSMKkQhev8xKTrveF32ig0y O+pnAXa8vz4wS10sPFKb9NT1Ko28saMS+jrJ9TtaDAFZWDCDiNL2wc919UQAXZSig42noyi/km7Z7 hjpZtHqnFGfALtAibdQb6e3y+RMSwyWSSzEUK5L3P7hkfNHkkRlok2JG6Q20uC0SYWDDJrKxSjmYd MfT2N6yWpQIXJFbRxwnfKvTai7Qg36ZzRuQ+Ud2+/JwAmrTOBZ9cwNcPvN3nBT5V361Umzs+YCb41 LnomSHIoopuIE+xuzQag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh3Bg-0000000C39O-3bDn; Thu, 22 Aug 2024 08:28:56 +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 1sh3Ba-0000000C37N-3XkI; Thu, 22 Aug 2024 08:28:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=r4jWIpEZLxpL+QNNvq6qiccCa0KZQLyErcga+NsxlxTjMT/CFjOuReBncy4pbsagwPvEHn2v03Acyj9U+hvUADVgFMW2uZ7OPBTrKBgZ3VXCR+y/UShw6M9lshptBumhf/nbjvaNuyrggedxh4FSxOiGtdgWRjmNFCCvaVtrTQ75Yl2eIpgUAZF3EIlJ5/prsrTGC65d1Y0Er8Lg844q1PfnobxzeTRjpiHnN4kh0LXFVK8gn12P6fmdjxKci2R139DZ2yTXoL1TcZY8waTrRUDLEfRqkPNStwhqCd6vL5YFuSaD8farHVbA73tYDU5smvJet8xCvqTWu64+2jkAXw== 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=oKNx+Jq9+iyJ8QX7+xS8E/ttjUKqR/hh6VfhIesQ5II=; b=HRML0qu55/55WQeQZkFdnWZw/eSEW0QGJbFyotOyPFmlLVwwqfPBeuAill9egy6RXuef17uTo2vuerjjFVaWEUZmeiiZeBNP8vRdGcc/pYyeg3qyNW8CsQJ67pq5I/XD1nE0HcoTuMu1SQuTM0DjeguProvRp2PwnpWHGVahgBPXiYAXhfUU7HehpO1EKc7GoghzAZEfb3Nv3SsDBoeP/Ll/++O0q62CR/svyf9D2HTC9QaU9VB2yNKolLgRbb8uKNXpo8nue+tOVdDAZrW9+eqDqhivQVIkeeHgrYNI69UoFscGT1lxuCAMWTlJ9ClIeG9/v6nQ0ipvtk3Vk8C+ig== 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=oKNx+Jq9+iyJ8QX7+xS8E/ttjUKqR/hh6VfhIesQ5II=; b=DjxcaOyrL7L09EnsYDTxBSNyrUnwlTvrN/oc4XoZ8CfneMhPsDKZfHdOfI1vJwXpEzf1QbndSo1bcD5yhawGlZRKZKk4VqE4cMIdbUtftl2bPT7654cJf2cFS9NiYJh4JOcL15c0+XvIrOZ5sRlOPCKIl8G6zLuZ13zP1+9wYjGjP9LJRG17p3L/UMaTNPkFctFymGPVndDptXEG+bpgshK2pxZmjy9/6K9ePdYS7Rd9dyA+jhoF5BCwuHGGMU3wuy+ekwi7pfLstiVeAEPwEKJnIzWUEfQliR4p7lwpo9BSYKmqTqmN/UU9ADLIGuhtBf/XChZAO7ZX8w2/+vXP1Q== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) by TYZPR06MB6114.apcprd06.prod.outlook.com (2603:1096:400:33f::6) 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 08:28:44 +0000 Received: from TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::6257:d19:a671:f4f1]) by TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::6257:d19:a671:f4f1%3]) with mapi id 15.20.7897.014; Thu, 22 Aug 2024 08:28:44 +0000 From: Yangtao Li To: vkoul@kernel.org, kishon@kernel.org, krzk@kernel.org, alim.akhtar@samsung.com, frank.li@vivo.com, konrad.dybcio@linaro.org, liubo03@inspur.com, robh@kernel.org, yuvaraj.cd@gmail.com, ks.giri@samsung.com, vasanth.a@samsung.com Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/4] phy: ti: phy-dm816x-usb: Convert to devm_clk_get_prepared() Date: Thu, 22 Aug 2024 02:43:41 -0600 Message-Id: <20240822084342.1595239-1-frank.li@vivo.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SG3P274CA0024.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::36) To TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5275:EE_|TYZPR06MB6114:EE_ X-MS-Office365-Filtering-Correlation-Id: 27236175-df8c-4e9d-c062-08dcc2846f61 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|921020|38350700014; X-Microsoft-Antispam-Message-Info: fUHBPfAQazZkQQhKhrHNWejHYtG57HtpRzmZ3dyYSManf3nElcNTJNpgg24I215ZtAfLOMNkZJA1nqm+8RF/fDIujoUMCOtuBHgS/uTmt36kNzKKmHfxzQcNUbPxGMfoh3+W20mnhoVQo1+fij67/C/z2KZf8U3XwsRVKSkNCeLwJNYzOWl4X1043V9xjCCLTxiFG38pHnqK3Xs3mPA67hegZNGXcJAKMVeImEDf1g6/ralpz5rzrNDljwAgEHM/CRefyILwko6Xx2I886yo86mBBkiFV45DIYp0q1h8FHs5zJeE22E+xWRX2v6Yogy7NKxXHllqx1OIt+gzSK5fN7zxyy+A0d4UcP5ojWUYeCyDCOb0rUJ0ybu3w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efront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB5275.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cWsmoTZ0Wj6YaAKUzIAkGrKwdchjparZFq6kHP1EcK1J9gilwGc6rpwQMjmXgZfUgkwCzdARi9oam0SMMvpFOlpoCOA8LyFbkcIt38J3qUhrgyJzTVjJmyjg9rG6mTpKJT9FrQARwnXf10mFctbFB5lBBuyn5Zar6dY+VNCg3LeVuY1xTWEuKZ5Ndt8jz7O/LkLqGpJkVVNIdv+5ZV2CDXsaTHL7lmQICtEjm58KS0BUP4X5WHv4GXE83IqhtsR5XIF+T9fAPOWLMCDCU5Oc22j9ZfoemMljKwCo7oIpBBfTMkirZx54hLo2Pdmqx2nZF8gQkmo+iY1dHUbVw7jVeZ3zkMn8Y+wX0Jss//5YOxmNsYCMACpP29bnwUYxV/M9UjwXw6yZWhnmVqA4IGtNIWA2OnNiKQZW4fCrHllqa5yy+xd2QIE2mDIE/3QJoTBY5BT/zUt4PDm0nZLZhbHmSxqlw3rWpb8wiI3kXmQBCpAIswSZYn0xTojKJ3VlsgXGYFz6GomcuXdT/d4/FkbS7GZfGuIzl7ommmAWJf48i9jUMKxVioAFIffJ0BgOI/HsCtIL1ZErzhWdV7SlrUgbiNbgO1np/he7l60Ie51Aib2lJlIBvuTzEGPMg595dBEQhlw+SrE2JASbdeegnfgoE3VT75gyswXH9ly62PTTyE7q/DfZjemQkM6on/XntrNeMJJU2pU2oNQG/jilFyuv4edx+CHRHn8aGD+9kVBDGH1IDxpeODOBdpslJnH1ey3zGpgDo8B4mqk+ch8g9uta1MYptZRfj/WqMlxfVf+0sXFsyTGGs5zFs0RHBPCz9ecbDUvAOZvSp+Adq7iM1eaJG6ZwQ33OF+JqCIs7MA+RAvvZRFq9jeh6cWgUilkOl4ezO3i894m9gxtqqpqddgS/1SuUYkfPDoFMe3TZgstrg5iyE52k8drj8a6ZI9/uCgum1WEW/6nN0FJLLdIAGqLzQ8yMjaAaYmmTXc4P4Ml9Q0emj5t166whFIWbHpnMXmKu79XHw1siIRqSoia+P/wX3P6Z535dqkC3eQ8WyZjxn3wLIM/R7lwq0OXA31i2KZTlZV3N/1UgA4hfVcg4fhMC2JVVxq7z4gtYGbCWdV3jFh7sHjhX58gbrAOt5xeAs7cmgpgSRqe3q85qWaLid9oH7o6KyaQVOx0V8KlYcElQ2suohu7rYL4Z3gbj+rzalyCzdTrsDiR5jZcd6o9iyJwJVW/26CDNQVNVaSwaZMowf1tE2ppaYxj8pRDBQg+RTX5mVsYmneMHF24/ImiblO9nPI/1Ukg2jTgAo152e3ZQneyZxUK1qIK1ZhUO1Nqg48bu1TqQYDksHdLxo6KpsMnKMgr3T+8BEzFhjdEIdwRdQNMWaNVwVCgnIislVcQVRiILhTzA7BO670/CGAVC2c+heF7n96YEpJBpBWjXDlEd6/pCQ18RpMjslpXodaZRHbem1WHGqpT7etQPtV7dRzdEuSyGscRhTbckNhVCRRbggqYy8axqs/OOgl1uu+Kqi1jX8aB37HN2FTaV6Zq40xC1kx6ksfcC3PTsJ7P+jX6oCv+oPYwfzUWnKF1uMOyW8zvx X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27236175-df8c-4e9d-c062-08dcc2846f61 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5275.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 08:28:44.1310 (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: XycuF9wOKZh374GumBaTQPuYD4FtCJRmIj4GWBFtjX3GXs0j2Vvs+FfOJEb0WptqY+dsBfW4ZWLFtQIwAdK8iw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6114 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_012850_919101_6D04D3DE X-CRM114-Status: GOOD ( 10.88 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Convert devm_clk_get(), clk_prepare() to a single call to devm_clk_get_prepared(), as this is exactly what this function does. Signed-off-by: Yangtao Li --- drivers/phy/ti/phy-dm816x-usb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/phy/ti/phy-dm816x-usb.c b/drivers/phy/ti/phy-dm816x-usb.c index d5ae972a31fb..d47674ec5e96 100644 --- a/drivers/phy/ti/phy-dm816x-usb.c +++ b/drivers/phy/ti/phy-dm816x-usb.c @@ -215,12 +215,9 @@ static int dm816x_usb_phy_probe(struct platform_device *pdev) platform_set_drvdata(pdev, phy); - phy->refclk = devm_clk_get(phy->dev, "refclk"); + phy->refclk = devm_clk_get_prepared(phy->dev, "refclk"); if (IS_ERR(phy->refclk)) return PTR_ERR(phy->refclk); - error = clk_prepare(phy->refclk); - if (error) - return error; pm_runtime_enable(phy->dev); generic_phy = devm_phy_create(phy->dev, NULL, &ops); @@ -244,7 +241,6 @@ static int dm816x_usb_phy_probe(struct platform_device *pdev) clk_unprepare: pm_runtime_disable(phy->dev); - clk_unprepare(phy->refclk); return error; } @@ -254,7 +250,6 @@ static void dm816x_usb_phy_remove(struct platform_device *pdev) usb_remove_phy(&phy->phy); pm_runtime_disable(phy->dev); - clk_unprepare(phy->refclk); } static struct platform_driver dm816x_usb_phy_driver = { From patchwork Thu Aug 22 08:44:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13772932 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 77742C3DA4A for ; Thu, 22 Aug 2024 08:29:42 +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=rb1LK2bd2Ez4bB43dSCDWeYWtlOkFoIFtMgtTPh/+Gk=; b=yqNZCTjgAPPV2t Tux5b/k4wUtY4Esywv/JeLlhWFl9km7VfN65fwAgsMj0QiEl8+F/lXBzFWMzcGRK7UGc8gGDVfAFh QiB+mjv9EGa7AdpOK0cCRMRJuFCvRuobcPFGy6ckVKcvYTzFXjAT6TDq6PjxK457u0hcwQ7Mp++Sx 5H086iSdmtnYQ/M3j9izruNQg9mvLLf+1dCiHFvcny7W/CcH2hIMvjY/ImKSJYD/Acf/3oHqPtJZ4 rVcH++y9kXwFMIidjzmE7JbYeWhgiRlg6Rv33YdhObYk8+ocves6iTO+pAUyTQu2/9rpsxn5df0hE NRbYVGfBqzxx9kh+Uicg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh3CQ-0000000C3SA-0drf; Thu, 22 Aug 2024 08:29:42 +0000 Received: from mail-eastasiaazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c400::] helo=HK2PR02CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh3Bw-0000000C3H9-2EV5; Thu, 22 Aug 2024 08:29:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jdBAHYgiz2Z+kMos3t3z9y64jBMTopJyed15QT3og8jIh+dOPvJzPwtsGiWXd2RSoJcYB1TkJ8zbbdjeEF0nfhH571MkIqO/xWz/Bp1CiNenMUxeRwiCLrog9VxDPETPKNT2l5FUNdoaXYt/cDtNdeWdMrd9o5N00Woz5r2d1497n6u+2vbW2xyL7HuEGWypnrrMScnU2TFSVZaspPRs+xA8GMquvJRliSh20bP/nskpkEg4ps7axMpcpm8XMTUhmQ8+hZRFLpUOjnnQE4ZKu866dtEzuedTdk++KLXdtjz3CC2hCNk6Zzg9GNbdWqGv8kplh0wYjWUrAt7SkILLaA== 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=RXoV2SjY+ZpgvvB4OOesnELfc3f3Gl5+ZZS/e+vkutY=; b=e8AhdV3Pdizk0dWvCoaXzIMI4xHlDMESi/neurPtvNtRW5hF2LV+WTyye03sac1e1NPgpzoxR2bp5tGfAHhv+6sGjkQsCoZkXzhW4DsYTN7Ro190kUoQ3LVn6RnADu4Q5QDDWNLOqcL2HlsdQoIuma5bwn8gx5w0G1POqc7s4LY4AQX3sb1HsWv8fzymb2fVxFKSNr6AQRVEFtUq3AXjPhOnyKQciQw8xbiZ6hx7XKxdkwY4ttVdasLQqQ8mMJSe3iPZZabO+xaCPwJkkFMJtHTeopAWfGRORaBqG6/e1Q50K1mHSDyTCh4ASemGwpubQpbDtuT95PalIeQqxgHMlw== 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=RXoV2SjY+ZpgvvB4OOesnELfc3f3Gl5+ZZS/e+vkutY=; b=iHf7pvvYSfsv5IolbDCt4PyXuWtZJDvWTFUqoL21OMqyJse9DDAZfq0wpwCpXm2qrmLn/1xIIQ4kJ/MjePfv76geWJ5W4AUIUtf23iRhZICNEbFpgM4LOefWWpZZv92XxBpiX7Uw+n6h7IHlqYbv/9fLCIXowepS3kMYzavWpS69uRLggtsaedhVf5actpuUO447bRuybdtvjQlsLHu8Zh7WozTwvGqgYGgUXbjes3ZSHJ1URtYbWWnpFp4Zmd0/+uXe7/3e0uTaDNWGp8rQsLYUNrkQSGD+D/Hev2Q9fHQJEg8QcHlrs4CdFIxV0qpjYKXD4M6wr6kU1f+DDmo8bg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) by KL1PR06MB6259.apcprd06.prod.outlook.com (2603:1096:820:d9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.25; Thu, 22 Aug 2024 08:29:01 +0000 Received: from TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::6257:d19:a671:f4f1]) by TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::6257:d19:a671:f4f1%3]) with mapi id 15.20.7897.014; Thu, 22 Aug 2024 08:29:01 +0000 From: Yangtao Li To: vkoul@kernel.org, kishon@kernel.org, krzk@kernel.org, alim.akhtar@samsung.com, frank.li@vivo.com, konrad.dybcio@linaro.org, liubo03@inspur.com, robh@kernel.org, yuvaraj.cd@gmail.com, ks.giri@samsung.com, vasanth.a@samsung.com Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/4] phy: qualcomm: phy-qcom-apq8064-sata: Convert to devm_clk_get_enabled() Date: Thu, 22 Aug 2024 02:44:00 -0600 Message-Id: <20240822084400.1595426-1-frank.li@vivo.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SI2PR01CA0031.apcprd01.prod.exchangelabs.com (2603:1096:4:192::11) To TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5275:EE_|KL1PR06MB6259:EE_ X-MS-Office365-Filtering-Correlation-Id: 58823b07-4f8a-48ac-684c-08dcc28479bd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|366016|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: 3TTHHn8zvI6SO+Gqt6Ib/LwxSSoD6Zz0iYYUEMR4vbaejMcYLXFFfaThBlI4AsU2kAUrVtSTKEXUnagreEWOlm/PvAfIUggMUPhGczCXMG1h80me6vkPIjRJrpmjmNrLPa5U41q9fHQmYPMp5VDRB+d6m06NacVkLJ7AUGA4R49cIZdVpGa9NlS9D8Vl7Otv29chUwJII9ZDI15DocDAXc0DxePysrnCAIcSKkwpOmEBTOUxIR/ndmuO/z+G9hyacAvJ8savrtb7KB/fiGUNeQx80RJ2KfVWBytVesuYqlr2ZiHUD+3u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t8injo6kdEmuNJZpWWrGjyF8ERoTBfW+WgkmN/8NuZzYMQ/mfI1JNUPh0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB5275.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(52116014)(366016)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: raSqRl7REV4kj/VXPGbBpwqVKbbIDoc3GJ1BRvJG7WuHS9J1fgEmtChIrpW89GYXLEURMMI9GcN7QrOVKecK5XIHuI2BCjllqgNgd5YPPyZIsCgLaEBLZTI19oJwzC8hPeSaXFQddsxOCrS9oXHtWk35IwMEZi7BS1l6MKkAPE53cQrOKmeeVoZm3peZzoHe/IHYCLM1F2CAGg7MsWHgENd14C2ewQhHRn8K2VMdhn6lz/vNOLxaoikW0RcAtscp9C5udX2tSYy6Ii9Vt7DWBb8pxjjqLj3SMop/BKmlTP4JNvwtCYRaYb9YtV5deK5OOJ/TfzzSEzsZtAJb2wIVh/U0svJgRzurUrGGQZPufsxZtOx2YjCTZQGvVHNy6OKxQdTrgojRWcad2Jrr2aGspfAi/oVcNlyRl27QfSvFSHWt0RSCncHLJY8/aN9S0aE8EOZ66chyOLBBlwD48wvoRwORXcQUX/GfSJ8vbwsRNIQz5IMwgWIPFalFLtWFn4gXiB/b80NmZSS8aHDRWPI5OVtSDKnIgRMumye4W4EAUeOZ2Bkl5djl7Ai1d2OSwbCNX7R+1vuBNXZUH76lhbiiJgFsYXAUUUfo8SvdiPqj8VeJa1GBNL3cAhV7iP1w6FjUi0CFPqy+G4HD6NshqIVuK6dJh+ejWvCUqYMleEiQvVlnfmFZiqKbGQCyAY+McH1PhmEFF0ox1nSkYsT9v+XrZrDkSgAiNOHDytNGN76S8gQeXEp+4l/clVdFN42h3TKriYIQm6Z2p9FZlWgssGSDLYCUxadFJ3Dr6u2gK2BY5XQTliQAqLJ+GvI80CrDAoq6gSU9FreamRkNRyipK0/8kefnPKyjqr7X06fxI6LFvhCrg5jmyQHksrsu7Szr1T/VYQDmXY3g0xU4Uwc4GPXHw5aFeuqGtWvPR94dgedauFDR/Qy35bo8O399j3txAedTIccWCLyHDaZwwHh5B27dbxRPDvn4e0XLWbT7T6DmteTU1VwkfLDIqlKPzWAc14Jh/Q/3U5t9GgM64t11JmuUieZRvSgPzyiVQAvSGm/m89k3lPnp3WcV1gn5OjMm90BQcgh1g3wRXoJKffccjRgUwua+WeErEtxZo2FCZnT631Tyf+qmsi/iyqXccAb6gs9UxlExscpORQewkwDeObT5TTTHcy5FbDVS5pZSm0pypOsnH0in/1NYIzNoilatzWqeAVjHqF26sfUG+g2aQmCl2flwi550ZK/G5g/8t0Q5UrG3Xe1Rek4WAvShPPSEp3YRzSZmHbwSu9+YySthRljfx64bFySU0Cxksfl9aBywOix5tso/LVEpS+WoXcdVv+kJJfek1+o4NARPqJlB53/d85eGyHN9PCvFLqG7oTjekvyfkJNh3xKb6zaotAueD7u2Aru9zO7+PKlQTMEh/YL0l+DYLeF//nZpnlRXCX1mrIcW4lp2WErrwTKSKcyY8u1SBxJn4qEWY1BRrNonQ3JzH1hK+i6KpwmgoQMnFXo9vynE4iI45CJ1gCAOqzro+EH6vAMeEBYTpYIDGIwhvcLFhLaP5MlC0uamHFUK4x/k7Dhjc4LjhEv49VcNgA3yVO+i X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58823b07-4f8a-48ac-684c-08dcc28479bd X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5275.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 08:29:01.5020 (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: iJpfHEMme18gq3FrqL0XnPtxnAHH/a8xlAnmG5fOUBaOg2yIa0y/XHjqofYjhb20dtA0PsmUPNBrXr04OhPCdg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6259 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_012912_655768_767AC670 X-CRM114-Status: GOOD ( 14.60 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Convert devm_clk_get(), clk_prepare_enable() to a single call to devm_clk_get_enabled(), as this is exactly what this function does. Signed-off-by: Yangtao Li Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-apq8064-sata.c | 22 ++++---------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c index 3642a5d4f2f3..18c0dbd8e707 100644 --- a/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c +++ b/drivers/phy/qualcomm/phy-qcom-apq8064-sata.c @@ -68,7 +68,6 @@ struct qcom_apq8064_sata_phy { void __iomem *mmio; - struct clk *cfg_clk; struct device *dev; }; @@ -203,7 +202,7 @@ static int qcom_apq8064_sata_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct phy_provider *phy_provider; struct phy *generic_phy; - int ret; + struct clk *cfg_clk; phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); if (!phy) @@ -223,19 +222,14 @@ static int qcom_apq8064_sata_phy_probe(struct platform_device *pdev) phy_set_drvdata(generic_phy, phy); platform_set_drvdata(pdev, phy); - phy->cfg_clk = devm_clk_get(dev, "cfg"); - if (IS_ERR(phy->cfg_clk)) { + cfg_clk = devm_clk_get_enabled(dev, "cfg"); + if (IS_ERR(cfg_clk)) { dev_err(dev, "Failed to get sata cfg clock\n"); - return PTR_ERR(phy->cfg_clk); + return PTR_ERR(cfg_clk); } - ret = clk_prepare_enable(phy->cfg_clk); - if (ret) - return ret; - phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); if (IS_ERR(phy_provider)) { - clk_disable_unprepare(phy->cfg_clk); dev_err(dev, "%s: failed to register phy\n", __func__); return PTR_ERR(phy_provider); } @@ -243,13 +237,6 @@ static int qcom_apq8064_sata_phy_probe(struct platform_device *pdev) return 0; } -static void qcom_apq8064_sata_phy_remove(struct platform_device *pdev) -{ - struct qcom_apq8064_sata_phy *phy = platform_get_drvdata(pdev); - - clk_disable_unprepare(phy->cfg_clk); -} - static const struct of_device_id qcom_apq8064_sata_phy_of_match[] = { { .compatible = "qcom,apq8064-sata-phy" }, { }, @@ -258,7 +245,6 @@ MODULE_DEVICE_TABLE(of, qcom_apq8064_sata_phy_of_match); static struct platform_driver qcom_apq8064_sata_phy_driver = { .probe = qcom_apq8064_sata_phy_probe, - .remove_new = qcom_apq8064_sata_phy_remove, .driver = { .name = "qcom-apq8064-sata-phy", .of_match_table = qcom_apq8064_sata_phy_of_match, From patchwork Thu Aug 22 08:44:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13772977 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 3198FC5320E for ; Thu, 22 Aug 2024 08:30:47 +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=9MoRNu8BzLbC3s3WfA4Yl5DUoo5UVX6DeaJUIO8Eu+w=; b=ozAmaXjB3H8IiZ 8eLDV/XD1EHc3Y5fKE0ehVtOHCIqemcThsktHjWWavSQ1TJ0tSxgyaEVtMsB9tcqY8JLxJSoxg3p2 uDvGz7UZdne3wWbedHoaXiLHGPZ+vSNvCB6I/z7j+fP3GKKwaJcL+t/lAr7pN84DRfNUnqjJVNPuG eGaOjJOwqlJDFSe5kdjdv649MRgmntDSEpAIKY7CRnvRjvc8egwOffeHhBqf9bqDLSOm3sWrBSKUr rhupL4tbWeR1HwB9dCcoMus9T+PU49ngspEKxuRdXAvNkuYxiCx3H0Sl6fcRt2aOacirn+bFlKfmk DwdIpvZtCWFAtNwokUeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh3DS-0000000C3hp-3Ch6; Thu, 22 Aug 2024 08:30:46 +0000 Received: from mail-eastasiaazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c400::] helo=HK2PR02CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh3CA-0000000C3Lu-2vtN; Thu, 22 Aug 2024 08:29:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MdIey1ZRSt+FK49vjYcirux/1LkHK15QdHI/wJ2QnxwOmC67zu4/tQpfRmK/A+9t5Dd5kHwA9RsoEAt+M80Bl/alfY29F9PWlT5ByHyxRjM1yc1LyP6JMOyfl4Kc4LR4g0Ti/1LX8eu4/FVbKnkuiuTEyBJfvLTvjMT5FDJbrguROKH5wk3BGCP6HxjY8szDbD7NnT29S4O56ZLfGF4FT3V/DzCutuJME9XZbg7jJZm3SymNbzXsPdd8DSsIQeXx7NKXmSX21xDpZoBrtVGsknN2ENd0Rq5SK2X4605/FzhpL3gYwWL/+Yn6bztw/pQ4ZTtOobX2rZ6sqYZy8BSu9g== 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=GV1DdG239fBs/5MPerHZ2v3BI6ptBPZQiZkIO3Dv1c0=; b=Rx7VER9B6A1EMsyq0H8PcXy59/yfEgLmwovu7S3w/s8nWQ5o1pqc4fsc49w5OTkVJvxOq7nsDIe+wt+B8w+dcXtLdFBHbmeTM4gg74ul/GyTwCdRFjQ4Um/fmwIZLXJBC5CLmy5Pr+/v/uWR3//vJQfH4aOv2d+oLM2L8QRgEyjRrmPL9jpw//Aqz+MtQMwg9ce4RcDXuUhm0qThpmuxplbSIU+TXcGovtpjYwtM3a6qF5FqoxYGNX27k0TFDd+E2nqiCgBWDJE/wIhxWElWw6UqGbWgxDKJ7Z7VrYSJfaZAjdviTa3G7G+Vm7EbYycioRuehdjxTuC5QcXMROk/2A== 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=GV1DdG239fBs/5MPerHZ2v3BI6ptBPZQiZkIO3Dv1c0=; b=GFUZ8RKXZq9K18YxydEYVsZDdFZpST+jymoWdu6viLHya5FdoTUFRqHw8aRWJXXlhugSQ6stQxGu66JUdSzmIEmbKiI6rDvVZoWVRBSlYWzjp19vBv8FJUBrShPWptyTlvUU6URMMLVKzumx8JWxC8waEgYQQG2SKruoey8I9PhjefyCbhXlEwtAkBRIuqawLToEG22PID5Ci6oYwXKCYi/Dm2GYBrDqTBUB0XvAgqpMmx8utevQ+3qNqBPT08c9q4WR5jCLj0GlaY0jCYha4ipdJF5M0N9yrH386V5A9TG4J4fWfG6lhnKrzKnavDgb5CXOCidCoPwit5dp5BjDVg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) by KL1PR06MB6259.apcprd06.prod.outlook.com (2603:1096:820:d9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.25; Thu, 22 Aug 2024 08:29:18 +0000 Received: from TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::6257:d19:a671:f4f1]) by TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::6257:d19:a671:f4f1%3]) with mapi id 15.20.7897.014; Thu, 22 Aug 2024 08:29:18 +0000 From: Yangtao Li To: vkoul@kernel.org, kishon@kernel.org, krzk@kernel.org, alim.akhtar@samsung.com, frank.li@vivo.com, konrad.dybcio@linaro.org, liubo03@inspur.com, robh@kernel.org, yuvaraj.cd@gmail.com, ks.giri@samsung.com, vasanth.a@samsung.com Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/4] phy: qualcomm: phy-qcom-ipq806x-sata: Convert to devm_clk_get_enabled() Date: Thu, 22 Aug 2024 02:44:16 -0600 Message-Id: <20240822084417.1596110-1-frank.li@vivo.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SG3P274CA0013.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::25) To TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5275:EE_|KL1PR06MB6259:EE_ X-MS-Office365-Filtering-Correlation-Id: b59d44c0-7c39-4167-f494-08dcc28483d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|366016|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: hpTnIy0mLttdN44Eu5/5jEDbN3hg/Woxle5sounxNR39Kod+bH/wMes0RhgiaY2TnFxu5e00G7JzDLnmHm/tkOvMItAhMNspM8gydTvXxfDsf6nvh+zkLCaGceXd2j6dmnUJQWXS6In7e1rNTU9fWacLkSxt0hw3Ovyb7Zc4CnqI7G8rBXMuehQcExhLZJFHviy0f++mPF+B6e2LmkxAs9dWSYu6uA55nt9vMmS+39szE/6Y94tcNaa1hbC+8mRNNsIfc/wCTbrFdrqlHDQZx1NVQTPIOXa9d5dZlCFfh86EcL60w2WPOPO6eauFgLsnOIW65bQ2iOjqZNDvvP13vZJ4Rg+3MTHlFaa0LlhSCaic+L3O+zE6i2GHLnGBE7/6Zfhy8AmQpbbXwWN09Yeb1bmZvO6LrH7HyBspRpUk7nGV/OjV9EuIa71uC4wYZRcqe9t4MoFV7nmi9KUN7vI0tKFLepZAy8Luo8VIYty8BtG+HmSyJP8wfzFotBbORaQe9bJ7FPbF8/HJc4yykxssP83bhAYTwMC2r4ncGeVH6y2ysc1tfVwde5DVK94jfZ5HdPb+fQoLDZS842aCpLLP+gF75iUSxAErqVOa9C8o+cbBkG23MSVPpzZ2Ha/DkHkgzPV44862Kifl2zxb3axdFj/pY6etUGWDMCI4sGI5srt7SNkCXojkgoo6XDIPr5LGvrYa989rb7+N98h9rcWAox5Ey9rIbVFiCdqmWgXJYFcaCgE7a9gAv+OVTno0DRlMO2IyPdBBspnPA6eEwa69p+CFI8ptPfTsLg09a1wN/9+7G2LzcW60/Apm/Wr0lpAQUFdgDOZyEPBTp/Lq60TP+0uKdzGFlDJHa+73S17pFmXiEDGv2bwltKT/uWzASwAhYjA8vXBN9EhcVxqGXhCGEQVp7EGBL+KdQ9Fxbnflqu5rvhTWok7RbQT+d5W3jaszcRSTBgcFXSu4rrM1QdwfnNIHqjT0XMb611GI1EZ+lY1eSKxwUCKOBFMEBj8vShKdgDmDTLd8BzJf//6sXP5EL0cDZ71Z4oA8A00KZox92G+R14oGTq49jM22H11xHQa3rK+dX86bqIy8lVXa9bGvfDW2TV9J/klokhXOMmz9Ua1e5tZ9rUhXKFVtR4H/WgHiFRJWPiGLvvLNQujijh+smJ+GO10Cy3YZqUKS26z+rnH6H1JvKzJaXJ/1oTnSsyqlZBh2UrAYW56zn53GVCOC8/ywgd2oi9EjEvpMpBlBuW/Kz7jvKYyccEFI3S23uezQHWaYhOy+GHq08YhyQDBLiKlLlbqGzcb1R2uFnI8YPTl4tYkh/Z8VmbSAK+ieDBzh1SaoTR1gpupJg+g0g6TljFJEJWXxZU47mMlO+qTL9JZnhRRUxigWgdQSmZFVLsi9/iuL8oSfcYAOsNMyUzN/zSj832bZbvUHEyIWF0yb29Y= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB5275.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(52116014)(366016)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9WB4DXntx+8i9sYHWVYScNWpRqepHm1W5NSg7OqpLc5DNtyagoU8iUnlkzy7yAmA2dTEkz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Xi8O9N53DbHmckHckP6Df40pSidWqiWfnCZ0Qy5yjjA92pxhznCbqleSPO/8s++sJVxMVKwGa5VzPlKNyPuuqfH1ds5UIbvIcxk2Sv6o1+s+xIv5cnDIuSmwRVBHsgzpKYnu1VoPbSVW1piX/BfJZO7OtqUSQWAL9Rw1ZFtQgUi7QuoucbiQ0THQTKM1pf8VLUbsJsBa9ImccgtqjYkFC/VKFsvuoIBJU8N2UjqYSFGPda97TzDHPCY9F12K8oSeDNzEGYzF6NV1Nh28EQmS9cznbeSsDf9cbi16ZKqwiphaWzbT5xQlLGKdWKF0S66f6bHGuMjl8fqAZghZycnnVwpTOjpC9N3BBT/PXjAhLsZV6LYL8MRRhablE2ACuFFbS6kz5RgU6SN3MAwebzqZ12PaxkZON44DqzrGX3jxnxb7D8yXZVZUIMhzW0RU X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b59d44c0-7c39-4167-f494-08dcc28483d3 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5275.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 08:29:18.4043 (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: RyfcwVH2+o+eoAirAJcXXmtM4o2uYzveFPOLdGDFWGcGb3HgqTUrSFUhOR2K7N9sHgNVNABNnTs78CBruV6ibQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6259 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_012926_774460_79686D85 X-CRM114-Status: GOOD ( 14.70 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Convert devm_clk_get(), clk_prepare_enable() to a single call to devm_clk_get_enabled(), as this is exactly what this function does. Signed-off-by: Yangtao Li Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c | 22 ++++---------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c b/drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c index f0a72b82c770..bf2d91c00700 100644 --- a/drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c +++ b/drivers/phy/qualcomm/phy-qcom-ipq806x-sata.c @@ -17,7 +17,6 @@ struct qcom_ipq806x_sata_phy { void __iomem *mmio; - struct clk *cfg_clk; struct device *dev; }; @@ -130,7 +129,7 @@ static int qcom_ipq806x_sata_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct phy_provider *phy_provider; struct phy *generic_phy; - int ret; + struct clk *cfg_clk; phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); if (!phy) @@ -150,19 +149,14 @@ static int qcom_ipq806x_sata_phy_probe(struct platform_device *pdev) phy_set_drvdata(generic_phy, phy); platform_set_drvdata(pdev, phy); - phy->cfg_clk = devm_clk_get(dev, "cfg"); - if (IS_ERR(phy->cfg_clk)) { + cfg_clk = devm_clk_get_enabled(dev, "cfg"); + if (IS_ERR(cfg_clk)) { dev_err(dev, "Failed to get sata cfg clock\n"); - return PTR_ERR(phy->cfg_clk); + return PTR_ERR(cfg_clk); } - ret = clk_prepare_enable(phy->cfg_clk); - if (ret) - return ret; - phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); if (IS_ERR(phy_provider)) { - clk_disable_unprepare(phy->cfg_clk); dev_err(dev, "%s: failed to register phy\n", __func__); return PTR_ERR(phy_provider); } @@ -170,13 +164,6 @@ static int qcom_ipq806x_sata_phy_probe(struct platform_device *pdev) return 0; } -static void qcom_ipq806x_sata_phy_remove(struct platform_device *pdev) -{ - struct qcom_ipq806x_sata_phy *phy = platform_get_drvdata(pdev); - - clk_disable_unprepare(phy->cfg_clk); -} - static const struct of_device_id qcom_ipq806x_sata_phy_of_match[] = { { .compatible = "qcom,ipq806x-sata-phy" }, { }, @@ -185,7 +172,6 @@ MODULE_DEVICE_TABLE(of, qcom_ipq806x_sata_phy_of_match); static struct platform_driver qcom_ipq806x_sata_phy_driver = { .probe = qcom_ipq806x_sata_phy_probe, - .remove_new = qcom_ipq806x_sata_phy_remove, .driver = { .name = "qcom-ipq806x-sata-phy", .of_match_table = qcom_ipq806x_sata_phy_of_match, From patchwork Thu Aug 22 08:44:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13772978 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 72818C3DA4A for ; Thu, 22 Aug 2024 08:30:47 +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=5Ip9Z81BMDedkl0WEghlIXi8tNnVyLNi+kMwzUQDNyg=; b=bMp2ZIsykNr2Hu x4TbkfdR/Pq/V8AEZtp7FysthsCneTgcnQPhvuLiJS3rqC7YISOztz7BcdG7ticTEYgYRSPdjnjp6 8yq+KR+lexlEMpYRI1YXXJqmhB/miYaMKA1bnXvHTc3YPJ+dv42oGYqxTYGal11zJzcjE2oWRBx2T r0ROqVEkb0mU8wt9vGwQ7grPirf03bBAs1FP0oHykBCR9rxz/0lQ9mBbZQsZq9pANpHcxiK7Y+2Zv VBAq3vK72LCPqn6xJiurXBSQkmM9VYggrzOuRDi3lMNP0KIHO0EzC7SsTewVFEIHgFBHUclszp5jN pinNLS1aNaH4b8c241vQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh3DT-0000000C3i9-0WJO; Thu, 22 Aug 2024 08:30:47 +0000 Received: from mail-eastasiaazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c400::] helo=HK2PR02CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh3CM-0000000C3PK-0Zwf; Thu, 22 Aug 2024 08:29:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qPyxI4cUYNECDLgUZW6KrZjK9qgnl8bBRg+fQGgB4iOAR8YeGsUSfQmWK6E9W2Zy2LeP6dIC2u+6uxs5xiGgTFtMPLutUMbD03cK2Tgy0wgnKcGiIfZZc0cCdtv1B6qJDl6rL0W4srbCDEg4UdPsZzxwhKq1p4fBDJC02JslkRwUiUacA+ZquiawDGGrMKEizSSRGMzvKR6/FDmtIcgqvrHKE+qgiaregoTMbwXSVEialTAuxlWrIh/tfeDH8EamCoqr4LU9zFX08rZN5ZT93/kOr9ij7i6S1aUr4tJdzq5B7M8nEalCMNLhk4I5QkywwWZ3XL0GmPqLIPVgzJ24Bg== 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=VwkPutKog2rmpE2FfH+ojM7ztMMWoa7jeLrE1IONC8A=; b=uoTi0assD5xacGoZ2Ki+GovDXen+4i7sr9PPF4HORu7mItbjidy5AO6kaEn13MasZ1pmxuSCV2K281yIZdL7P0ZMQKz5OQeCW3zvvG/PIk55GS+gJ/GMioaX25GB38SpYig9hlg7T0OUmFm+hBTAtbrzVSTB2Au8H0mMZopGB/tiINQBc0qwlOtJX2ib3VNWULMdkbiqNPeUUduh12l1BEAXlOrkj2Dd09XZtl8bNqwTMZDFbx1a/gwAcybskmqr+5B02zd2CB+EycYwzThZXFcFmcUAUaMpncP01cLEMPn48vBJD/21jTEwnedpI938hBp8mo3Gc0X8E3AgeGjcdA== 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=VwkPutKog2rmpE2FfH+ojM7ztMMWoa7jeLrE1IONC8A=; b=U+C3LDTQRovKc8gtWxKyCjLYCBVyY5Q9bq4ypDxOK/WU4eAzksVRn8VtENw7NgSROqkW9TMY9gMjcGSlAnHbceePOEa7KJUDv9BHeAkT7VrHjFN53xN2ETgf7CBicOtW3DQrv6IIDCvJ1eiuYcI/sBq883SPOB+/eZC8J+FI1KeEJynD0zscn5QRs3EnkmKy6ns2h4E9rTRFRMuNZC6rHU7vgcQgXQoG49AcxQwmMC5HuLYmBvb/R8Oj69EHbP+SmlpACZZ1x+VFWqPjKElRwKjPnPGg0m3QTnfFf/qgZ78y6GyFqW3Pzm2WJ8AaePXxTvU+nucgxdO2kbNzw3awow== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) by KL1PR06MB6259.apcprd06.prod.outlook.com (2603:1096:820:d9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.25; Thu, 22 Aug 2024 08:29:34 +0000 Received: from TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::6257:d19:a671:f4f1]) by TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::6257:d19:a671:f4f1%3]) with mapi id 15.20.7897.014; Thu, 22 Aug 2024 08:29:34 +0000 From: Yangtao Li To: vkoul@kernel.org, kishon@kernel.org, krzk@kernel.org, alim.akhtar@samsung.com, frank.li@vivo.com, konrad.dybcio@linaro.org, liubo03@inspur.com, robh@kernel.org, yuvaraj.cd@gmail.com, ks.giri@samsung.com, vasanth.a@samsung.com Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 4/4] phy: samsung: exynos5250-sata: fix missing clock disable in remove path Date: Thu, 22 Aug 2024 02:44:33 -0600 Message-Id: <20240822084433.1596209-1-frank.li@vivo.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SI2P153CA0032.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::23) To TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5275:EE_|KL1PR06MB6259:EE_ X-MS-Office365-Filtering-Correlation-Id: 285cb0d2-4634-46f9-0096-08dcc2848d80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|366016|1800799024|921020|38350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8Ke5J1Qi08yJjziPU/bCl3cUAWV6kWXWWqoXjgrlUwXKXcAHk3xZLG7ZTXzkd2l1mkJW5/VRhTNfuqpIb699Ym0YHcVa+KXrYhVidGGQ/JSddIO+06HX5gxKFVCcFZVI0/ncUQ/g8NLpB8atoboyByhjkIE8UZAKP1sbU3IYAAuRQ80WDdMSVpX+InqInjegUE4WEvA1CCFdpX9RXAz3fRK+mxSxidLR70n/8Qkz0DVCT1IJikIYZ3x3YOhZONGwUCzb9p+MboB3QpYTeu7alQFtySpdJr1cJFUELOcXA5DxjyywWQEnsqKVippMX/2R+VlkOW0KYWUooldqt4k9FcwJ3KSiHoZHQPn4kD/trqueozcM9I4VTRFM8WkgN35O7pkATnKvfBgt9WSDbQsbSBo= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB5275.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(52116014)(366016)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: j0Cs0aOs1ho8KBJgHpHsT9RQOR27oKYMzxISSWqt9nwtVxaWThQRVJQ2aiWPrL4pVC6PVjbyWXgAqD4TgcsRkQXYRQ180wHwa6ZawNnGQXg+Mrv7jYCvqZy3RUK1Dq8ZASeSQ/VXliL0AO52tnDYUJM4ZSzvWIllt1tQX9aJo4gvWbSJGrpXJN2X+DhMM7g8bcizUaGy+jtJcw/tbhLt9v6f3qUf2OIonFEqC4uCG/B4YXiPX65utwWnG8h+M953/wh3wJnW/n74R/JzmePfxrz9hC3wJjgWLIqI1kT2Du6VWbaPoeXKXbtLLwUcxZeBLuq1KF+ea+Oe6lvxkhTInhoyJXPlLjm4KXuy7es2kJ2iXRZ9e8TcVF5sBeNZn34drYUHT5R4UvZxFGtMDQHpRkSt2SMcJDchJ+QOY2vKBx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KyflFdIz5OKWuQXEHyaYle6BOd4XTyJFr8+dZnTIOdl4ZR+rxlNimHOoraGriVoLPgzyo4kw1AkG7L70V0vPpwO6oEeL2iL9xm9 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 285cb0d2-4634-46f9-0096-08dcc2848d80 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5275.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2024 08:29:34.6463 (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: CQE2T6OlVUJKSYHZxiRrWAobUbqdfyF/JVPqvR17E7HsXbOd+097Mum3cOJUGZC4/hURxXyeDZ2XE0gip+xI8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6259 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_012938_205158_C8EA2D34 X-CRM114-Status: GOOD ( 14.27 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Convert devm_clk_get(), clk_prepare_enable() to a single call to devm_clk_get_enabled(), as this is exactly what this function does. The devm_clk_get_enabled() helpers avoids the calls to clk_disable_unprepare(). Fixes: bcff4cba41bc ("PHY: Exynos: Add Exynos5250 SATA PHY driver") Signed-off-by: Yangtao Li --- drivers/phy/samsung/phy-exynos5250-sata.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/phy/samsung/phy-exynos5250-sata.c b/drivers/phy/samsung/phy-exynos5250-sata.c index 595adba5fb8f..0452b236ea50 100644 --- a/drivers/phy/samsung/phy-exynos5250-sata.c +++ b/drivers/phy/samsung/phy-exynos5250-sata.c @@ -47,7 +47,6 @@ struct exynos_sata_phy { struct phy *phy; - struct clk *phyclk; void __iomem *regs; struct regmap *pmureg; struct i2c_client *client; @@ -164,6 +163,7 @@ static int exynos_sata_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct phy_provider *phy_provider; struct device_node *node; + struct clk *phyclk; int ret = 0; sata_phy = devm_kzalloc(dev, sizeof(*sata_phy), GFP_KERNEL); @@ -193,16 +193,10 @@ static int exynos_sata_phy_probe(struct platform_device *pdev) dev_set_drvdata(dev, sata_phy); - sata_phy->phyclk = devm_clk_get(dev, "sata_phyctrl"); - if (IS_ERR(sata_phy->phyclk)) { + phyclk = devm_clk_get_enabled(dev, "sata_phyctrl"); + if (IS_ERR(phyclk)) { dev_err(dev, "failed to get clk for PHY\n"); - ret = PTR_ERR(sata_phy->phyclk); - goto put_dev; - } - - ret = clk_prepare_enable(sata_phy->phyclk); - if (ret < 0) { - dev_err(dev, "failed to enable source clk\n"); + ret = PTR_ERR(phyclk); goto put_dev; } @@ -210,7 +204,7 @@ static int exynos_sata_phy_probe(struct platform_device *pdev) if (IS_ERR(sata_phy->phy)) { dev_err(dev, "failed to create PHY\n"); ret = PTR_ERR(sata_phy->phy); - goto clk_disable; + goto put_dev; } phy_set_drvdata(sata_phy->phy, sata_phy); @@ -219,13 +213,11 @@ static int exynos_sata_phy_probe(struct platform_device *pdev) of_phy_simple_xlate); if (IS_ERR(phy_provider)) { ret = PTR_ERR(phy_provider); - goto clk_disable; + goto put_dev; } return 0; -clk_disable: - clk_disable_unprepare(sata_phy->phyclk); put_dev: put_device(&sata_phy->client->dev);