Skip to contentSkip to conversation

i3c: master: dw-i3c: Assert reset control in remove() callback

PATCH Superseded Felix Gu 2 participants 2 messages Mar 16

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Felix Gu

author
#0 lore raw

PATCH 1/1 i3c: master: dw-i3c: Assert reset control in remove() callback

The reset line acquired during probe is currently left unasserted when the driver is unbound. Add the missing reset_control_assert() call to properly reset the hardware when the driver is unbound.

Fixes 62fe9d06f570 ("i3c: dw: Add power management support")
---
 drivers/i3c/master/dw-i3c-master.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/i3c/master/dw-i3c-master.c +2 -0
index d87bde3f7700..5303282eb816 100644
@@ -1690,6 +1690,8 @@ void dw_i3c_common_remove(struct dw_i3c_master *master)
 	pm_runtime_disable(master->dev);
 	pm_runtime_set_suspended(master->dev);
 	pm_runtime_dont_use_autosuspend(master->dev);
+
+	reset_control_assert(master->core_rst);
 }
 EXPORT_SYMBOL_GPL(dw_i3c_common_remove);
 

---
base-commit: b84a0ebe421ca56995ff78b66307667b62b3a900
change-id: 20260316-dw-i3c-e7a36bc90682

Best regards,

Signature · 1 line
Felix Gu <[email protected]>
#1 lore raw
Quoted 15 lines · Felix Gu

The reset line acquired during probe is currently left unasserted when the driver is unbound. Add the missing reset_control_assert() call to properly reset the hardware when the driver is unbound.

Fixes 62fe9d06f570 ("i3c: dw: Add power management support")
---
 drivers/i3c/master/dw-i3c-master.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/i3c/master/dw-i3c-master.c +0 -0
index d87bde3f7700..5303282eb816 100644

drivers/i3c/master/dw-i3c-master.c void dw_i3c_common_remove(struct dw_i3c_master *master) · line 1694

Quoted 5 lines
drivers/i3c/master/dw-i3c-master.c +2 -0
@@ -1690,6 +1690,8 @@ void dw_i3c_common_remove(struct dw_i3c_master *master)
 	pm_runtime_disable(master->dev);
 	pm_runtime_set_suspended(master->dev);
 	pm_runtime_dont_use_autosuspend(master->dev);
+
+	reset_control_assert(master->core_rst);

Switching to devm_reset_control_get_optional_exclusive_deasserted() and removing the reset_control_deassert() in dw_i3c_common_probe() would have the same effect.

regards
Philipp

Signature · 3 lines
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c