Message ID | 20240820121651.29706-2-rongqianfeng@vivo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 CCC09C531DC for <linux-arm-kernel@archiver.kernel.org>; Tue, 20 Aug 2024 12:19:15 +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:References:In-Reply-To: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:List-Owner; bh=XHP4teSQ5F5zOPyfclpHySQ9EVrCPdichgnicjDfqjg=; b=IRMJy9ps07ey9X4oubdRErexmq 2pmOdD5SvaNE848RBRdAQIRD3QmPx4l7I5lNdIax7PJrgY6zAhxoIg20FN9zJ6R6btEXKH86yDXxE hvVAA6J5BOXoWOm/hKkvdeCBIHAU+SRZtNCclugY7G0BBL/V+6Y+tfIocoFQYz8TSqyGukwoBTLXk aDOMIqVwqF1+IE8+YPc0UXMo0SR5GsnYqYxHCAo30I3BnPZRgoY3m7rBDBRALK7JBAJgm2joTr7kk SxI016SGKHuR2w5JVWzyIlCHznt613d4HEPTTlLTuq170sl8iTzRZoC6Rw3gs39r31rMKuX5BSZVB sJScsLLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgNpH-00000005ACi-38F8; Tue, 20 Aug 2024 12:19:03 +0000 Received: from mail-psaapc01on2062c.outbound.protection.outlook.com ([2a01:111:f400:feae::62c] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgNnw-000000059pF-29Sg for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 12:17:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EQycSoH6YiJ6kur2uZ/d/BZKiW6OuiiQkr0NON/N0h22EF4TP50/4RsRuUgriEs30gFsEkVBy3gsbrjTdvTSK1eT/oGG1GSzSwcw8lbB6ve1SlPpxO8k8JYScNaYTJ+Um/nKyHU0RW+Blm0Kf/H/f7vZWJbD7msgB8m2YIx5zQ6ZxE+/DpImkQ9k3NBX7Xl5vYXDzOgBph14EBAvezwRk1S+1Ywv6ViLuvuZxOyGGgZ7xLRGPnIVuvy0j0IY+BBlhEqyedgO282OctrpptQWX7h78r1YjjH3KUN7c3txzsYzlQYzaeB9jSKSm9/p2MRieJ1i/GZMZSxtbzqAJS6dHw== 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=XHP4teSQ5F5zOPyfclpHySQ9EVrCPdichgnicjDfqjg=; b=LCmdrgu80VdKIs8EwU1AxAVM0bRpTVMWfH3OTEdS0klQLZhjv1IzTUEzYxL6ifVEkzo5WDTsl+6b3tryiV8c96In0LdRD1XCgkJzOeSvj09+ubB0bu9f0FibgJuo3xZOjeJNwjJge7J4mv1jyU982+D3KoBNzUCsNOrHBqs32e/SGPr/Z4vx5z/CtsMB0khROZFW4Wcp4aiTxYwondRmMH9hMLDZnMtRaaH8VjMcWbytplH1vvOmw/WFq6Jns50LfvV16RYHLXNeT6Ljb4YGL4jaGdrUoosnjNvwDwP1z988TS8gyyAPQ/3AYMMZoQ5e8f9rw97FxFUFaBmgGAV8hw== 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=XHP4teSQ5F5zOPyfclpHySQ9EVrCPdichgnicjDfqjg=; b=eqawLTreUn6U+GpjSTbnOO+zJq0Z5V7x/hmzAp27agd/RHJ4NfzdxAT7C4SM57pdyPuIei8L0ozFqHHtM5jwYKEG1Sg6N+oDwz1HXX49z90jvDNOR4N/O/LTEFpBhTxzVSEgvozbXVRM4cducexTsDaRA2vzxQbjK2R7tVFCG4wTz3+yOsWj//0m5RR6tLai8TFZGqrjo3EOIylZa3dh9yJOHAhc+kHgOZpPj9WMMJz7v0lcC7R/IwgavXx+SI9JPJdHu3lhTp0caxz6OyyYLr5CaYsqpEOngEZduq3QgoMCN0SjkFnBOVxm3GPDj+y8YnmHzdbysLcsDCsLBPq8tQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SI2PR06MB5140.apcprd06.prod.outlook.com (2603:1096:4:1af::9) by SEZPR06MB6285.apcprd06.prod.outlook.com (2603:1096:101:130::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Tue, 20 Aug 2024 12:17:29 +0000 Received: from SI2PR06MB5140.apcprd06.prod.outlook.com ([fe80::468a:88be:bec:666]) by SI2PR06MB5140.apcprd06.prod.outlook.com ([fe80::468a:88be:bec:666%6]) with mapi id 15.20.7875.019; Tue, 20 Aug 2024 12:17:29 +0000 From: Rong Qianfeng <rongqianfeng@vivo.com> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>, Srinivas Neeli <srinivas.neeli@amd.com>, Michal Simek <michal.simek@amd.com>, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: opensource.kernel@vivo.com, Rong Qianfeng <rongqianfeng@vivo.com> Subject: [PATCH v1 1/2] gpio: stp-xway: Simplify using devm_clk_get_enabled() Date: Tue, 20 Aug 2024 20:16:50 +0800 Message-Id: <20240820121651.29706-2-rongqianfeng@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20240820121651.29706-1-rongqianfeng@vivo.com> References: <20240820121651.29706-1-rongqianfeng@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYCP301CA0063.JPNP301.PROD.OUTLOOK.COM (2603:1096:405:7d::8) To SI2PR06MB5140.apcprd06.prod.outlook.com (2603:1096:4:1af::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SI2PR06MB5140:EE_|SEZPR06MB6285:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d53f3f8-dc2c-48cd-f901-08dcc1120fa4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: ZpuIU0b9WyTkZiZw016IXml+uKjvuz3jymAgRjtZCUjhTClcX2aiCJWUOROMl6G31O6tw1kyrdJqMwiSp+nsXw3ZnY2SK9SWFm1FnGYZGsAfcg+kMvDdULG/ORkp+y0ExXtlMj3oLo/6Vlvk/WWmsriXiB9MIwEMZ6JlfVSfXa3SvZCXEH7RrVy4RtfORbb3crbdslmt8cKP3j8w34qlN1s0Pf/PVmLQftKYO2Y9b5XXSg/R9dpJBlkkvgVg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5kq4/kyqkySzDMD52WaRTqrarj++G2fP12gp2BSSsGkBm6SnOk99yOpE22sXdCFTiIat3ByyNX7HjnV4lOaGzLQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SI2PR06MB5140.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hlF9GTvuGal0K4ITNFcZnFrPkXaMHBrhAmKe9TAeCkytrR06NYljWJ4dk1BoybmD5XbSMsLiXBI3gMLOQ9vlofzvM2/QNu8BFlhnZwOrVUWDYTka0B7YDBuA5WGIDeQ3dU3/NfA8nbyQpe8MBpCeyYPgeBDGaBQv84wg1TRxzhyPOB9uheZX2iIyzfUZ67bt/GMj+9WVwtu1CB05WF2TDzGACCxIn4elb+cbR9K9238MyDIAakWRuHQ9rI9lAcELYPHyO1EM9knW29zrGY059WY8FcBqZXEuRSSq214vCAuBNFCRgu4oIZmpI92ynCdS8kMGCWUX04pXNDk5jA+dB1/V0YM4NTWOQ+mkTGm9c/gycHeJhRL/xO3tYkmf/sMXqmujo/iR6jv4eB7run8GlVftQmbKMyYDapI0tNl3HyD5e2bydjI1piEmEpQZpjfwq8nRsowYbOs0ZhWMF3yHdpPRX5oar7Kyl7JLdGs7TyOCFY+GBkJ0NzUv/2bIXC359SIhyvspZRhmlTrbdqDcJMN1dfDaPbaHuSFuxXPhyajBe9UDgK/hgckFOA6CLEPm9NcAQjnDrPOR56puoTJV9hEyXg+cw9zFi9G72RM3tTlgxsiTuAwV5gpnn/KxAHyAxu1YoCoxuuPp+Ns7CJH/94iuU1xvi49McB85AeLMddp8CzxWCAhag8ZG6ZkSYlFVRFwUBcbo8QsqGK/5ejyunveOW2BaK7kkwoRGnQs9dQmJ6PSbechOuWBGI3EXFqz9oinajMGCUuIbf9Kb13sG6ca4omVt0zZH/ysa6V3be1ZHHoS5PWkSAAh/az737pNNzZr/p1DAGEkS83hy/ubaHMjwMUT6X9yId90AVYxCqAjgxVgO1F43cGdD/K87BBssQvoJcM2LggPGmAN12Vxb7+UQvrqXzbekMRNJmM5ISgmjdJhAJcIRgRahzsiGlKJv3B7oIgNS4M78NUJDlnWj82ljbuzRDaqzu9jwpt7KRAELHqxidmQSZTZemGzrztHVnp9zqc2//jEzcYTYgkIYr/7hGal40lTQzG22lddw9DYmH96Qhs7j854IkxF3iOWGlO99AlMFBmEpegStGnKZ9jO4yzbuT2IItHZsOmYQZMSdhr6rctFGHQz1gbf2xIw546p4TpVq/WKRob2DA1lytezJlb6OoP2vWhIdodweCqwByoC/tOxk1wdhtMqAzZG9UiKrP/KZ/S2XUrfFWOX3koGNLMtdvDDK7AirKeUiIjTZ8ZEZyKihQiiTMWXfMQ8b1v16saOg3fUW4EhmqT9mvidXeBf66xkZ2mGEtt6bgkyZjECx5KzMFCo12m5QkoX/M+GV9vTM6ptamdBkWZ8w39R+3i+D7knW0ejjaRtGo7duKDJOyhN/S01vVDa2Q8bshXj+A7ktZJgbfRFPQZ2/RtQLC2V3sm9k6tiTu6Fiz3Fztp5yf6Ji1R3cgWPa2H2jsPtuHUJTNYBa++OKTDgwE2AlNsZH3Jj/t1kaQZR4sP8pSw231O5C0ZVH6hbngSFqzWEYurJficsWTADTvI7ajQwAyH8S0qM6LPx1QafEQ6jsqLsptUu0mooCNM3KQ7ks X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3d53f3f8-dc2c-48cd-f901-08dcc1120fa4 X-MS-Exchange-CrossTenant-AuthSource: SI2PR06MB5140.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2024 12:17:29.7749 (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: RKdlKf3iJdYFiRCh2XaCH7e85hMIflcD7OcAIoWdeAHPsQW381gm9I7N291TpMv2knMqNGUGl0WdRHlVL4exOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB6285 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_051740_577801_C81A469E X-CRM114-Status: GOOD ( 10.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
gpio: Simplify using devm_clk_get_enabled()
|
expand
|
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> On Tue, 20 Aug 2024 20:16:50 +0800, Rong Qianfeng wrote: > Use devm_clk_get_enabled() simplify xway_stp_probe(). > > Applied, thanks! [1/2] gpio: stp-xway: Simplify using devm_clk_get_enabled() commit: ece70e79868c75d946819db4fba095c8c96ddb32 Best regards,
diff --git a/drivers/gpio/gpio-stp-xway.c b/drivers/gpio/gpio-stp-xway.c index 053d616f2e02..5a6406d1f03a 100644 --- a/drivers/gpio/gpio-stp-xway.c +++ b/drivers/gpio/gpio-stp-xway.c @@ -296,23 +296,17 @@ static int xway_stp_probe(struct platform_device *pdev) if (!of_property_read_bool(pdev->dev.of_node, "lantiq,rising")) chip->edge = XWAY_STP_FALLING; - clk = devm_clk_get(&pdev->dev, NULL); + clk = devm_clk_get_enabled(&pdev->dev, NULL); if (IS_ERR(clk)) { dev_err(&pdev->dev, "Failed to get clock\n"); return PTR_ERR(clk); } - ret = clk_prepare_enable(clk); - if (ret) - return ret; - xway_stp_hw_init(chip); ret = devm_gpiochip_add_data(&pdev->dev, &chip->gc, chip); - if (ret) { - clk_disable_unprepare(clk); + if (ret) return ret; - } dev_info(&pdev->dev, "Init done\n");
Use devm_clk_get_enabled() simplify xway_stp_probe(). Signed-off-by: Rong Qianfeng <rongqianfeng@vivo.com> --- drivers/gpio/gpio-stp-xway.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)