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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 821599 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2083.outbound.protection.outlook.com [40.107.117.83]) (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 BCFCC17DFE7; Thu, 22 Aug 2024 08:28:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.117.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724315328; cv=fail; b=TGKtYUxs9DgrdUdGiiCl7BkeOVLIWOMqsAlqAMvnPeQezE1uDmeLyhuc/y1npyA35Acgmaya5KotUtNScEmfMHaGrhKf/dUOG9S4ItyE104c2LJCMRjptpIUnOKZgKLoN7+Q6VL6hZeC6CuXfWZLzygY/qH2wU9ACW1WclLiQW0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724315328; c=relaxed/simple; bh=SY1OQVeuycg6rcEd5ZtrbHKtWeMMPnXMMqhcn1zEwg0=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=YTzPV7tiA3Jmk+lLBh+OCfksGoUR92/fpcm6owFYuUKKM4fj4jmbq3+x2Fxn6j0ExIVNCQK5zhM16HAwod7cDkrzopJpyD3My2U8DvZshuiEq/cavPNuz/MX1PV6wK+JHoehNC5s3JYvkpTSKlx+mf5TEvGTWokNYhmEKm1zYRE= 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=DjxcaOyr; arc=fail smtp.client-ip=40.107.117.83 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="DjxcaOyr" 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) Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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+A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CNMcITC1lGOCY8O2F3PF5xv8o8= 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)(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 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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 822604 Received: from HK2PR02CU002.outbound.protection.outlook.com (mail-eastasiaazon11010059.outbound.protection.outlook.com [52.101.128.59]) (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 68F7615CD78; Thu, 22 Aug 2024 08:29:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.128.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724315349; cv=fail; b=bbUWvG4Pl0NkddaQUGK8hGYFBCAAZOB8eOuDhiN0fNkKI5pnt1iKO/or/AcwuunBZUUJhxsIkgnyI6+AeLg8elhGBkqzqFtNGeBXZjvCjuq/O9pZ9kOe0BON7MBBlFeK1gairVbl1liETGeFfKK0DwyTVZwZWrKwsq9/rgEmYE0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724315349; c=relaxed/simple; bh=/XPsf64X3Rbsl6cumfBIZr580oQCpXTCvTPbikTYnwo=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=MNQ0WV3fVGKu7x772NxGiipzdE00ke3TerxvkeTdLwQKoT1pq22T0bTfgN5VxGCAhifdc60n5Fd+HI4zgxY8K7fzCdyxX7TxplkTOi7z3jyTvRVGMrUY1B1entHchjULs/CDkx9Py4ySyd1czZQTB9W/6pvaxAAl5npy/m9yyWg= 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=iHf7pvvY; arc=fail smtp.client-ip=52.101.128.59 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="iHf7pvvY" 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) Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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+3uAxvyNjKIdjwoaJi7MI3lHqJNfnumse7wW5c3VEz1qnT0Y/BjgkQwNwVGU8Ulbv54itj9km4bf2MgsCeZoWztFXorFcl4y87eBPZ7BAgwRgSaLX6x4yqHjG5NnR8s9UiipqKckic4DdY7qj+ZAVMl1dfhhbE/v8LC4iolAXMOtunwDWFgtubrca/plC9WyXN9xXj982M+sHU4rVPDhncc7mb12ibEFRTP+2kcC81qyTbOF69KCT6I5+mhY8yyhbCtBqminYRilvMwj1NIbH2N3rtOknFnj6De3FYEYAL+o7HsQSBsW2clN88hNoWxs5WZCVm0FP+Xte8jwqFTxeobvxcXvDsvzRwaU1am//3Yk1J0bsUiY4QUs/434YbTIsoWo62pNZ9mUSPIhZcvy5hHRXc3zWvdNG1qpCQxYFZrEh6+Lbc9qRFmzgjJPbv8teeZ6G/cwPaRPfmQSFV27Zv2jiLc1iS3nSiQwFTHpGfSCzukNEMnP1ivssGSmmyLNhVQLLh/QpeLmaFa/Jpwe/strtCWelxlKKiFs8gf/smO6kr8PvzWu2DJjW8MLNWVqX/aq47rgu6zcdP/wcyB6lFHg+ONA61+GNMWgoAfkWlh5TWi1G5Zvbudaa3Lv52lY5Or1sNuIaGze87Nn1shOrVn6AWKGQK1qzgSBDgzVYPl4IpSZAG7I4GblfULgiStu1R6+XiD8QAo+prnjDDpgFumB4GRX7zXlYMvh75fceIY3O6yYxesJ79DWXrXxh8n4fqA9+02lvdDjuCaXhZXNe3YagYsu7VlBxwmDoWzqf7xJZVlw9nASzPuRGtRPSp8fT5Mz0299SWSrs20u/3pUKWP+IDid7evT+wJZyRk9cK9h/zHUe7ZV5fQ3QsSLLQF9h8fD9s2uilGrE+hh/UkHohpmzDlGDlM44ZhSlN8XoSc/DOWZRoW6UKegkAzZeSw0vPOcu52k/h2+SypeGpW7HyD1E6oZfBptnP6VDCKdi1UmGD+2bocvcymwvfSoOXSf5MJiMq8L0S5WKX3zD0XSv0PtBNQf4RO72q32KySjd+1jIdK/jcay7u6ojLUVHOwUOt8injo6kdEmuNJZpWWrGjyF8ERoTBfW+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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TU1VwkfLDIqlKPzWAc14Jh/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 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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 821598 Received: from HK2PR02CU002.outbound.protection.outlook.com (mail-eastasiaazon11010007.outbound.protection.outlook.com [52.101.128.7]) (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 D5B22179970; Thu, 22 Aug 2024 08:29:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.128.7 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724315363; cv=fail; b=GR9WGNYnyEVGFOLe7PL2WGuYNwq58iLWQf7dKUYgz7clQ0Y92QVzfrdg+inapGINvHWSqjMh2Bs0j5GkJStNkOx7CXRUwvY7MNf+sp4f1nz6ePOyJxsZ3Ey7IZnbcofM6FdyayQXZYW1mxiSQd1FT+TmG5xnPXpEvebIxW+/U9A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724315363; c=relaxed/simple; bh=ooS74M7FOxzcKw8o+7ABlyUi9XkGvkuLLxgEX2AGEO8=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=FF5jY9v4Ea9PkgRK5EQKOpvVkldtBHWpVuRuLpzlkYHrDLR90CfkYVz5E2OTh5lDm5ShbMW4dtyaGZZpz+v8SizXVFCnaMhdSPtujyUin8YIXCO+BEBjT3Ftrb7LVGphXkYJ/N+BMRVQYVoVxzAvii4FhyuqQia3iYZWWAFUzvU= 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=GFUZ8RKX; arc=fail smtp.client-ip=52.101.128.7 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="GFUZ8RKX" 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) Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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/wMes0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9rUhXKFVtR4H/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+8i9sYHWVYScNWpRqepHm1W5NSg7OqpLc5DNtyagoU8iUnlkzy7yAmA2dTEkzCzSRbbfJLsL7s4dnbVIkresJGroMneVQTsJvaL9Gzm179RLL3RyaJKblwpI9V5uyByW3CNEOstDOMoqeOGDhdm33dwaRc56qlO95ZXKcbZMaHf13cMXoRaeGc9Fgz8nGpk120/6kTFxOyrHlg6gNhEZphsMGJGakdkk83l2Q6AmL4fpnwt7nfk0fiSW261rrNYoekOSBjPLJdYXIs5PxlUnNFJWlpXLTU1FmZXT7Dg4ueQIPQARHQWSu4v4HfCh5FUP0H1sjrDVb8PA1ivFv3nq7BcOQe1YwXLXnI4Izj4EkwUyzdSCJUwSG6XQm0D54H0h6Cnj1yP3Ox1JO7jEXYAdM3dRQ58nrWNCyY6mwQRe37eTjHRR4tHYeVlnlSoN51VIj0tE379lc3/tiDyTciKhLV9ayl0FszbPr62JV8aaABHU2A1NsH4NR8Eh/al3bYmNIYR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orOrg: 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 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: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 822603 Received: from HK2PR02CU002.outbound.protection.outlook.com (mail-eastasiaazon11010014.outbound.protection.outlook.com [52.101.128.14]) (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 216D615F3F0; Thu, 22 Aug 2024 08:29:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.128.14 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724315379; cv=fail; b=DQRtPRjVNvt0erudr34gq/VFd7I7UFnOyoNH3UjW4Ls+fHOW7IfrKfkIzArlEQcaqjI6cxG21BeuO2Ky3hRir3BY7PQQWs11KzTiA/3WhhgZhvOx6UcvsKoFRNUjF17qa5SkqgYhlWv66Ygqvgf9C6sP+yudlAxnyi/+DVleXoE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724315379; c=relaxed/simple; bh=cQKG3AZcBfuolu/MIXCJqMGy3XnCgIP26xXAuubaKtc=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=Gsbg2xs5W2zR4bTKM6pgZnVUbIMLZRc5wR4EMGTTHagnBNu0QizpHPaKG29V5Eblxro0NmNooGpOWiEbCNNq/E5cigtf0ElHphSR2LyzhHHL0POrO4Luhq+5yT2yRxpfiVexBONcB8WF0Zyy9xt6tkTbL1Kqu/uLkmFB3CE8PKg= 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=U+C3LDTQ; arc=fail smtp.client-ip=52.101.128.14 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="U+C3LDTQ" 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) Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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|38350700014; X-Microsoft-Antispam-Message-Info: y25CAZDNE3vrAfKQQsE1DHy2id35bpyabrEag1v4uUJNOtjW7ffXFJRNGM9VVWkf/+k/0Wk/F9hGr/3qMlvte1QJb531bnQ3R1gDOfI81MDIs1GRtYAB9a9rb849+EoK30vK3fIxUW4qwD1Pqq2EJ25yY7TKU5wxOyj3/I6PcJpLL9C2S3eUoLgw7wkJ3OFHydLUUJ0XnKA8YORNwgne0VuoZ3gTYC4iysh154Q8/4ddgsgmCUFxgppTy6zn+XXZ9fIqkiShnlR3fd6U4r6nMt6Awzq4WiBf5kjpL4Z0Hh5ZRfNLPRGIMs4nXkIcyj0zCBatgT9nz1hydnrWk4iXAOBQbwa80A5UCRnf1nijCinlZn4VrLBI2PPPybmgUmYzlVJGZ0swvBkWvyNMeOhwzP+AWSKqNeQVLuBoHW8kOZLjh0RLqZWk07nLWUUyzpeqycglX4T6oAtjDLBT+EJgVySf0aZFlIZvvQwsQsLykOEm5BgsF/PyyVTJxB9e53hL2Tf3gYx/5BIbzgNHxtOqLG+i9SgFgwg353jzeKyYrTTXhpH6WGrxgfgAbgpiCXe4rSUpzcSQtVJ2TnxR3Ce361nDD8XxmaDeZcfeNRNT0E5qh1H4T8Eq03Tpl034+Zco40XRRbZR313TtIfpx1sVdBkm3dU2BRS9r0hPGlMSjbelu+I/YfTM2bxZ2A9+hnSTk5MmJx6dzYKcvlHdUhX7ShNUIG5m4I79w4jaeWjff6p9aXqbK4N0PcqsRAOhZxe/qKDBkrTaLQHvAps1vkn/UmU40zASd15C3AEbIqqYFRh/40Ju/GHnVSnQEXHJu1kHYcZkaSbDj3vg/ONkTodsVpSrstLQ9aDQtn6sK0o/ezDDGdlbme4Xzl3Pg6hUbx3HE2SMab67dsCfuVtGrZfRMm9O9PGezQ7qx6PAiNMvquchSek6nwef12kQmSYYsG6JdT9F9RVTjQff1WYWZ9aZDNXSQ64+lDiSq5QiCiiSkrrt4JUjR7qe8VYzyRv27YlUllkmJLwOEwWPL40edJOQ8Ke5J1Qi08yJjziPU/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: j0Cs0aOs1ho8KBJgHpHsT9RQOR27oKYMzxISSWqt9nw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gYJtiONw9UNm/S9GQ+Mf1MXXfzDAQd601UhBRioSJAxQctNkLQahnfC8+no3JuuXy8o1JEMbRdy1Bw/9EUXhuD6c1ugn7cXQv3k/jZqSlNOWZiDbKtM067I2Dv03tmbh3lDAukO0zp72xc2mYDs/+hPhMMxrIF1SkUEXTWtxu+NQbYTiNgmSwRJSmJ34PIEgJNTbcynI7MHhpVucufxnO4XidM620IyFiGJ4B7uG8nzdGmtxZshdClhdLBeqoLSCfGvWiSGdX1SuhecQSGTzyHY7EStpB4ZjoH4ACCCotiKEcK8qdDM+wSjnvmjac0dOXKb8sJAogY2T1fZB08Xqccpe2zSqyaOqLTyyGfZbPdTy+CKA9KIbpbpvTbw+FK5i+DvgA5wEa26KyflFdIz5OKWuQXEHyaYle6BOd4XTyJFr8+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 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);