mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
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 <angelogioacchino.delregno@collabora.com> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/20220523090449.14430-3-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0efcd08571
commit
32b615ed4b
@ -18,6 +18,7 @@
|
||||
#include <linux/pm_wakeirq.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/reset.h>
|
||||
|
||||
#include "xhci.h"
|
||||
#include "xhci-mtk.h"
|
||||
@ -550,6 +551,12 @@ static int xhci_mtk_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto disable_ldos;
|
||||
|
||||
ret = device_reset_optional(dev);
|
||||
if (ret) {
|
||||
dev_err_probe(dev, ret, "failed to reset controller\n");
|
||||
goto disable_clk;
|
||||
}
|
||||
|
||||
hcd = usb_create_hcd(driver, dev, dev_name(dev));
|
||||
if (!hcd) {
|
||||
ret = -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user