mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Felix Gu <ustc.gu@gmail.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Aniket <aniketmaurya@google.com>,
	linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] i3c: master: dw-i3c: Fix missing reset assertion in remove() callback
Date: Fri, 20 Mar 2026 10:43:27 -0400	[thread overview]
Message-ID: <ab1dD-ZgPoANHsg4@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260320-dw-i3c-v3-1-477040c2e3f5@gmail.com>

On Fri, Mar 20, 2026 at 10:18:02PM +0800, Felix Gu wrote:
> The reset line acquired during probe is currently left deasserted when
> the driver is unbound.
>
> Switch to devm_reset_control_get_optional_exclusive_deasserted() to
> ensure the reset is automatically re-asserted by the devres core when
> the driver is removed.
>
> Fixes: 62fe9d06f570 ("i3c: dw: Add power management support")
> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

> Changes in v3:
> - Fix the format to pass checkpatch --strict.
> - Link to v2: https://lore.kernel.org/r/20260317-dw-i3c-v2-1-fa57e6394b1d@gmail.com
>
> Changes in v2:
> - Switch to devm_reset_control_get_optional_exclusive_deasserted()
> suggested by Philipp Zabel.
> - Link to v1: https://lore.kernel.org/r/20260316-dw-i3c-v1-1-ab41904fc780@gmail.com
> ---
>  drivers/i3c/master/dw-i3c-master.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
> index d87bde3f7700..d104807cf74e 100644
> --- a/drivers/i3c/master/dw-i3c-master.c
> +++ b/drivers/i3c/master/dw-i3c-master.c
> @@ -1606,13 +1606,11 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
>  	if (IS_ERR(master->pclk))
>  		return PTR_ERR(master->pclk);
>
> -	master->core_rst = devm_reset_control_get_optional_exclusive(&pdev->dev,
> -								    "core_rst");
> +	master->core_rst = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev,
> +										"core_rst");
>  	if (IS_ERR(master->core_rst))
>  		return PTR_ERR(master->core_rst);
>
> -	reset_control_deassert(master->core_rst);
> -
>  	spin_lock_init(&master->xferqueue.lock);
>  	INIT_LIST_HEAD(&master->xferqueue.list);
>
> @@ -1624,7 +1622,7 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
>  			       dw_i3c_master_irq_handler, 0,
>  			       dev_name(&pdev->dev), master);
>  	if (ret)
> -		goto err_assert_rst;
> +		return ret;
>
>  	platform_set_drvdata(pdev, master);
>
> @@ -1671,9 +1669,6 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,
>  	pm_runtime_set_suspended(&pdev->dev);
>  	pm_runtime_dont_use_autosuspend(&pdev->dev);
>
> -err_assert_rst:
> -	reset_control_assert(master->core_rst);
> -
>  	return ret;
>  }
>  EXPORT_SYMBOL_GPL(dw_i3c_common_probe);
>
> ---
> base-commit: b84a0ebe421ca56995ff78b66307667b62b3a900
> change-id: 20260316-dw-i3c-e7a36bc90682
>
> Best regards,
> --
> Felix Gu <ustc.gu@gmail.com>
>

  reply	other threads:[~2026-03-20 14:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 14:18 Felix Gu
2026-03-20 14:43 ` Frank Li [this message]
2026-04-12 14:39 ` Alexandre Belloni

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=ab1dD-ZgPoANHsg4@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aniketmaurya@google.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=ustc.gu@gmail.com \
    /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

all inboxes | Powered by JetHome®