Skip to content

Commit 32b615e

Browse files
Chunfeng Yungregkh
authored andcommitted
usb: xhci-mtk: add support optional 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 0efcd08 commit 32b615e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/usb/host/xhci-mtk.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/pm_wakeirq.h>
1919
#include <linux/regmap.h>
2020
#include <linux/regulator/consumer.h>
21+
#include <linux/reset.h>
2122

2223
#include "xhci.h"
2324
#include "xhci-mtk.h"
@@ -550,6 +551,12 @@ static int xhci_mtk_probe(struct platform_device *pdev)
550551
if (ret)
551552
goto disable_ldos;
552553

554+
ret = device_reset_optional(dev);
555+
if (ret) {
556+
dev_err_probe(dev, ret, "failed to reset controller\n");
557+
goto disable_clk;
558+
}
559+
553560
hcd = usb_create_hcd(driver, dev, dev_name(dev));
554561
if (!hcd) {
555562
ret = -ENOMEM;

0 commit comments

Comments
 (0)