From patchwork Wed Sep 25 16:40:11 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Philipp Zabel
X-Patchwork-Id: 13812332
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 37E15CCF9E8
for ;
Wed, 25 Sep 2024 16:41: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:List-Subscribe:List-Help
:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References
:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:
From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;
bh=fqI3gk2HOfdcHt/rSB+crJDzzE3CxtYxZ1IZi9+Ta6Y=; b=sxBMlzsgqAQC69JWmRobD+GZXM
X8qk70boEFBXOPPFL24fnS3vg8GKYHF724UReOl3nZdRvLvOrEEBxDW2pjBuZPEKacHe5WWIWaAT2
mkX3MfY/AEPS/SE3lke1BmzNRUP5EhX9BSYrbe68K7/Dvt5GN8n7+qZ7IY/KelE/uDEcQfKLjbQEO
2hyMSlwG44AzZ/nwVPR8VhCrRFaNyIuZsuyLI5eZ4qYGGKInKci6PmNlh48Nj1fzlEFX5u4gSYSXe
ThlQzvzGkC/Gl3JiEyGTFwjFdOsAgovnn5D7JDmAvX1nf0HCbzn3piSByG4dWxzv2uh4Lsl7F85zp
TzaEX6bQ==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux))
id 1stV5H-000000065Un-2g2h;
Wed, 25 Sep 2024 16:41:47 +0000
Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104])
by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux))
id 1stV3w-00000006564-3xBV
for linux-arm-kernel@lists.infradead.org;
Wed, 25 Sep 2024 16:40:26 +0000
Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54])
by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92)
(envelope-from )
id 1stV3r-00046t-NX; Wed, 25 Sep 2024 18:40:19 +0200
From: Philipp Zabel
Date: Wed, 25 Sep 2024 18:40:11 +0200
Subject: [PATCH v2 3/3] reset: uniphier-glue: Use
devm_reset_control_bulk_get_shared_deasserted()
MIME-Version: 1.0
Message-Id: <20240925-reset-get-deasserted-v2-3-b3601bbd0458@pengutronix.de>
References: <20240925-reset-get-deasserted-v2-0-b3601bbd0458@pengutronix.de>
In-Reply-To: <20240925-reset-get-deasserted-v2-0-b3601bbd0458@pengutronix.de>
To: Kunihiko Hayashi ,
Masami Hiramatsu ,
Lad Prabhakar ,
Geert Uytterhoeven , =?utf-8?q?Uwe_Kleine-K=C3=B6?=
=?utf-8?q?nig?=
Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
kernel@pengutronix.de, Philipp Zabel
X-Mailer: b4 0.15-dev-13183
X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::54
X-SA-Exim-Mail-From: p.zabel@pengutronix.de
X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de);
SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20240925_094025_025229_C1857674
X-CRM114-Status: GOOD ( 13.27 )
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id:
List-Unsubscribe:
,
List-Archive:
List-Post:
List-Help:
List-Subscribe:
,
Sender: "linux-arm-kernel"
Errors-To:
linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
Replace the pattern devm_reset_control_bulk_get_shared() /
reset_control_bulk_deassert() / devm_add_action_or_reset()
with devm_reset_control_bulk_get_shared_deasserted() for
some reduction in boilerplate.
Signed-off-by: Philipp Zabel
---
drivers/reset/reset-uniphier-glue.c | 24 +++++-------------------
1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/drivers/reset/reset-uniphier-glue.c b/drivers/reset/reset-uniphier-glue.c
index 5f9f2f7994c0..a2a262bf6bfc 100644
--- a/drivers/reset/reset-uniphier-glue.c
+++ b/drivers/reset/reset-uniphier-glue.c
@@ -35,13 +35,6 @@ static void uniphier_clk_disable(void *_priv)
clk_bulk_disable_unprepare(priv->data->nclks, priv->clk);
}
-static void uniphier_rst_assert(void *_priv)
-{
- struct uniphier_glue_reset_priv *priv = _priv;
-
- reset_control_bulk_assert(priv->data->nrsts, priv->rst);
-}
-
static int uniphier_glue_reset_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -68,13 +61,6 @@ static int uniphier_glue_reset_probe(struct platform_device *pdev)
if (ret)
return ret;
- for (i = 0; i < priv->data->nrsts; i++)
- priv->rst[i].id = priv->data->reset_names[i];
- ret = devm_reset_control_bulk_get_shared(dev, priv->data->nrsts,
- priv->rst);
- if (ret)
- return ret;
-
ret = clk_bulk_prepare_enable(priv->data->nclks, priv->clk);
if (ret)
return ret;
@@ -83,11 +69,11 @@ static int uniphier_glue_reset_probe(struct platform_device *pdev)
if (ret)
return ret;
- ret = reset_control_bulk_deassert(priv->data->nrsts, priv->rst);
- if (ret)
- return ret;
-
- ret = devm_add_action_or_reset(dev, uniphier_rst_assert, priv);
+ for (i = 0; i < priv->data->nrsts; i++)
+ priv->rst[i].id = priv->data->reset_names[i];
+ ret = devm_reset_control_bulk_get_shared_deasserted(dev,
+ priv->data->nrsts,
+ priv->rst);
if (ret)
return ret;