From f6b3a51dabe3da53fbfc18cb0d53278ec686cacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=85=E6=AC=A2?= Date: Mon, 17 Jun 2024 21:32:36 +0800 Subject: [PATCH] remove regulator_enable from dwc3 suspend & resume for rvbook --- drivers/usb/dwc3/dwc3-thead.c | 59 +---------------------------------- 1 file changed, 1 insertion(+), 58 deletions(-) mode change 100644 => 100755 drivers/usb/dwc3/dwc3-thead.c diff --git a/drivers/usb/dwc3/dwc3-thead.c b/drivers/usb/dwc3/dwc3-thead.c old mode 100644 new mode 100755 index 72ae26a4c..6ede5b5cd --- a/drivers/usb/dwc3/dwc3-thead.c +++ b/drivers/usb/dwc3/dwc3-thead.c @@ -259,40 +259,12 @@ static int dwc3_thead_remove(struct platform_device *pdev) static int dwc3_thead_pm_suspend(struct device *dev) { struct dwc3_thead *thead = dev_get_drvdata(dev); - int ret; dwc3_thead_assert(thead); - if (!IS_ERR(thead->hub1v2)) { - ret = regulator_disable(thead->hub1v2); - if (ret) { - dev_err(dev, "failed to disable regulator hub1v2 %d\n", ret); - } - } - - if (!IS_ERR(thead->hub5v)) { - ret = regulator_disable(thead->hub5v); - if (ret) { - dev_err(dev, "failed to disable regulator hub1v2 %d\n", ret); - } - } - clk_bulk_disable(thead->num_clocks, thead->clks); - ret = regulator_disable(thead->vbus); - if (ret) { - dev_err(dev, "failed to disable regulator vbus %d\n", ret); - } - ret = regulator_disable(thead->hub1v2); - if (ret) { - dev_err(dev, "failed to disable regulator hub1v2 %d\n", ret); - } - ret = regulator_disable(thead->hub5v); - if (ret) { - dev_err(dev, "failed to disable regulator hub1v2 %d\n", ret); - } - - return ret; + return 0; } @@ -300,35 +272,6 @@ static int dwc3_thead_pm_resume(struct device *dev) { struct dwc3_thead *thead = dev_get_drvdata(dev); int ret; - dev_info(dev,"%s\n",__func__); - ret = regulator_enable(thead->vbus); - if (ret) { - dev_err(dev, "failed to enable regulator vbus %d\n", ret); - } - ret = regulator_enable(thead->hub1v2); - if (ret) { - dev_err(dev, "failed to enable regulator hub1v2 %d\n", ret); - } - ret = regulator_enable(thead->hub5v); - - if (ret) { - dev_err(dev, "failed to enable regulator hub1v2 %d\n", ret); - } - - /* enable regulator here for some extend regulator does not have pm func */ - if (!IS_ERR(thead->hub1v2)) { - ret = regulator_enable(thead->hub1v2); - if (ret) { - dev_err(dev, "failed to enable regulator hub1v2 %d\n", ret); - } - } - - if (!IS_ERR(thead->hub5v)) { - ret = regulator_enable(thead->hub5v); - if (ret) { - dev_err(dev, "failed to enable regulator hub1v2 %d\n", ret); - } - } ret = clk_bulk_prepare_enable(thead->num_clocks, thead->clks); if (ret) {