Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

i3c: master: dw-i3c: Fix missing reset assertion in remove() callback

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>
Link: https://patch.msgid.link/20260320-dw-i3c-v3-1-477040c2e3f5@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Felix Gu and committed by
Alexandre Belloni
bef1eef6 e7a71862

+3 -8
+3 -8
drivers/i3c/master/dw-i3c-master.c
··· 1606 1606 if (IS_ERR(master->pclk)) 1607 1607 return PTR_ERR(master->pclk); 1608 1608 1609 - master->core_rst = devm_reset_control_get_optional_exclusive(&pdev->dev, 1610 - "core_rst"); 1609 + master->core_rst = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev, 1610 + "core_rst"); 1611 1611 if (IS_ERR(master->core_rst)) 1612 1612 return PTR_ERR(master->core_rst); 1613 - 1614 - reset_control_deassert(master->core_rst); 1615 1613 1616 1614 spin_lock_init(&master->xferqueue.lock); 1617 1615 INIT_LIST_HEAD(&master->xferqueue.list); ··· 1622 1624 dw_i3c_master_irq_handler, 0, 1623 1625 dev_name(&pdev->dev), master); 1624 1626 if (ret) 1625 - goto err_assert_rst; 1627 + return ret; 1626 1628 1627 1629 platform_set_drvdata(pdev, master); 1628 1630 ··· 1670 1672 pm_runtime_disable(&pdev->dev); 1671 1673 pm_runtime_set_suspended(&pdev->dev); 1672 1674 pm_runtime_dont_use_autosuspend(&pdev->dev); 1673 - 1674 - err_assert_rst: 1675 - reset_control_assert(master->core_rst); 1676 1675 1677 1676 return ret; 1678 1677 }