From: Dylan Hung <dylan_hung@aspeedtech.com>
To: <jk@codeconstruct.com.au>, <alexandre.belloni@bootlin.com>,
<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
<conor+dt@kernel.org>, <joel@jms.id.au>, <andrew@aj.id.au>,
<p.zabel@pengutronix.de>, <linux-i3c@lists.infradead.org>,
<devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-aspeed@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>
Cc: <BMC-SW@aspeedtech.com>, <kobedylan@gmail.com>
Subject: [PATCH 3/3] i3c: ast2600: Add reset deassertion for global registers
Date: Tue, 8 Aug 2023 23:42:41 +0800 [thread overview]
Message-ID: <20230808154241.749641-4-dylan_hung@aspeedtech.com> (raw)
In-Reply-To: <20230808154241.749641-1-dylan_hung@aspeedtech.com>
Add missing reset deassertion of the I3C global control registers.
Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
---
drivers/i3c/master/ast2600-i3c-master.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/i3c/master/ast2600-i3c-master.c b/drivers/i3c/master/ast2600-i3c-master.c
index 09ed19d489e9..5d9d060134e0 100644
--- a/drivers/i3c/master/ast2600-i3c-master.c
+++ b/drivers/i3c/master/ast2600-i3c-master.c
@@ -11,6 +11,7 @@
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
+#include <linux/reset.h>
#include "dw-i3c-master.h"
@@ -128,6 +129,7 @@ static int ast2600_i3c_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
struct of_phandle_args gspec;
struct ast2600_i3c *i3c;
+ struct reset_control *rst;
int rc;
i3c = devm_kzalloc(&pdev->dev, sizeof(*i3c), GFP_KERNEL);
@@ -156,6 +158,13 @@ static int ast2600_i3c_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "invalid sda-pullup value %d\n",
i3c->sda_pullup);
+ rst = devm_reset_control_get_shared(&pdev->dev, "global_rst");
+ if (IS_ERR(rst)) {
+ dev_err(&pdev->dev, "missing of invalid reset entry");
+ return PTR_ERR(rst);
+ }
+ reset_control_deassert(rst);
+
i3c->dw.platform_ops = &ast2600_i3c_ops;
i3c->dw.ibi_capable = true;
return dw_i3c_common_probe(&i3c->dw, pdev);
--
2.25.1
next prev parent reply other threads:[~2023-08-08 16:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 15:42 [PATCH 0/3] Add Aspeed AST2600 I3C support Dylan Hung
2023-08-08 15:42 ` [PATCH 1/3] ARM: dts: pinctrl-aspeed-g6: Add I3C1 and I3C2 control pins Dylan Hung
2023-08-08 15:42 ` [PATCH 2/3] dt-bindings: i3c: ast2600: Add resets and reset-names Dylan Hung
2023-08-08 15:59 ` Krzysztof Kozlowski
2023-08-08 15:42 ` Dylan Hung [this message]
2023-08-08 16:00 ` [PATCH 3/3] i3c: ast2600: Add reset deassertion for global registers Krzysztof Kozlowski
2023-08-09 0:07 ` [PATCH 0/3] Add Aspeed AST2600 I3C support Jeremy Kerr
2023-08-09 0:28 ` Jeremy Kerr
2023-08-09 2:46 ` Dylan Hung
[not found] ` <TYZPR06MB65674B8AA26D959254101A749C12A@TYZPR06MB6567.apcprd06.prod.outlook.com>
2023-08-09 3:12 ` Jeremy Kerr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230808154241.749641-4-dylan_hung@aspeedtech.com \
--to=dylan_hung@aspeedtech.com \
--cc=BMC-SW@aspeedtech.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@aj.id.au \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jk@codeconstruct.com.au \
--cc=joel@jms.id.au \
--cc=kobedylan@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).