diff options
author | Li Jun <jun.li@freescale.com> | 2015-01-29 10:32:32 +0800 |
---|---|---|
committer | Li Jun <jun.li@freescale.com> | 2015-01-29 12:47:42 +0800 |
commit | 912c6268b685a9aa158cb84f9c46c8e6176572a7 (patch) | |
tree | 938383467bf0d78571f0c60b9470c3748a3ce851 /drivers | |
parent | e30f0515912ee927c4724634090c3cb080fecda5 (diff) |
MLK-10174-2 usb: chipidea: host: keep controller power if host has dev connected
This patch is to keep usb controller power on while system suspend if there
is usb device connected by telling GPC to keep mega fast domain power.
Signed-off-by: Li Jun <jun.li@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/chipidea/host.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 85febf7c0e01..4bfb1d43532b 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -25,6 +25,7 @@ #include <linux/usb/hcd.h> #include <linux/usb/chipidea.h> #include <linux/regulator/consumer.h> +#include <linux/imx_gpc.h> #include "../host/ehci.h" @@ -378,11 +379,16 @@ static void ci_hdrc_host_restore_from_power_lost(struct ci_hdrc *ci) static void ci_hdrc_host_suspend(struct ci_hdrc *ci) { + if (ci_hdrc_host_has_device(ci)) + imx_gpc_mf_request_on(ci->irq, 1); + ci_hdrc_host_save_for_power_lost(ci); } static void ci_hdrc_host_resume(struct ci_hdrc *ci, bool power_lost) { + imx_gpc_mf_request_on(ci->irq, 0); + if (power_lost) ci_hdrc_host_restore_from_power_lost(ci); } |