mirror of
https://github.com/revyos/thead-kernel.git
synced 2026-06-21 09:12:26 +02:00
lpi4a add wakeup gpio key and usb resume fix
Change-Id: I0479ed6cd676af7ad087968e1bb22f2b04e89337
This commit is contained in:
committed by
Han Gao/Revy/Rabenda
parent
a546653719
commit
1d7ed6a0c6
@@ -257,10 +257,23 @@ 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);
|
||||
|
||||
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 0;
|
||||
}
|
||||
@@ -270,6 +283,20 @@ 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);
|
||||
}
|
||||
|
||||
ret = clk_bulk_prepare_enable(thead->num_clocks, thead->clks);
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user