Skip to content

Commit e84e3e9

Browse files
Chunfeng Yungregkh
authored andcommitted
usb: mtu3: add support controller reset
Add support controller reset via a reset-controller usually in infracfg, it's different with the software reset by IPPC which only used to reset MAC, and it will also reset IPPC meanwhile. Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 32b615e commit e84e3e9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/usb/mtu3/mtu3_plat.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/of_irq.h>
1414
#include <linux/platform_device.h>
1515
#include <linux/pm_wakeirq.h>
16+
#include <linux/reset.h>
1617

1718
#include "mtu3.h"
1819
#include "mtu3_dr.h"
@@ -345,6 +346,12 @@ static int mtu3_probe(struct platform_device *pdev)
345346
dev_info(dev, "wakeup irq %d\n", ssusb->wakeup_irq);
346347
}
347348

349+
ret = device_reset_optional(dev);
350+
if (ret) {
351+
dev_err_probe(dev, ret, "failed to reset controller\n");
352+
goto comm_exit;
353+
}
354+
348355
ssusb_ip_sw_reset(ssusb);
349356

350357
if (IS_ENABLED(CONFIG_USB_MTU3_HOST))

0 commit comments

Comments
 (0)