Re: [PATCH v2] i3c: master: dw-i3c: Fix missing reset assertion in remove() callback
From: Philipp Zabel
Date: Fri Mar 20 2026 - 06:31:15 EST
On Di, 2026-03-17 at 01:48 +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")
> Signed-off-by: Felix Gu <ustc.gu@xxxxxxxxx>
> ---
> 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@xxxxxxxxx
> ---
> 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..f3dabd8d1225 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");
+ master->core_rst = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev,
+ "core_rst");
to make checkpatch --strict happy. Otherwise,
Reviewed-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
regards
Philipp