summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/core.h
diff options
context:
space:
mode:
authorArtur Petrosyan <Arthur.Petrosyan@synopsys.com>2021-04-08 13:45:09 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-09 15:16:38 +0200
commit22ff0c8e529ed3c3385f9807ec8efacf440c4c8e (patch)
tree84375bcd1bebe2f2ce5e18af7c037822f8e55423 /drivers/usb/dwc2/core.h
parent139fae7a08381c21026b05732e63c79018bb6c60 (diff)
downloadlinux-22ff0c8e529ed3c3385f9807ec8efacf440c4c8e.tar.gz
linux-22ff0c8e529ed3c3385f9807ec8efacf440c4c8e.tar.bz2
linux-22ff0c8e529ed3c3385f9807ec8efacf440c4c8e.zip
usb: dwc2: Add enter partial power down when port is suspended
Adds flow of entering Partial Power Down in "dwc2_port_suspend()" function when core receives suspend. NOTE: Switch case statement is used for hibernation partial power down and clock gating mode determination. In this patch only Partial Power Down is implemented the Hibernation and clock gating implementations are planned to be added. Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com> Link: https://lore.kernel.org/r/20210408094510.6C4E9A022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2/core.h')
-rw-r--r--drivers/usb/dwc2/core.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index b7d99cf9e84c..76807abd753b 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -1470,7 +1470,7 @@ void dwc2_hcd_connect(struct dwc2_hsotg *hsotg);
void dwc2_hcd_disconnect(struct dwc2_hsotg *hsotg, bool force);
void dwc2_hcd_start(struct dwc2_hsotg *hsotg);
int dwc2_core_init(struct dwc2_hsotg *hsotg, bool initial_setup);
-void dwc2_port_suspend(struct dwc2_hsotg *hsotg, u16 windex);
+int dwc2_port_suspend(struct dwc2_hsotg *hsotg, u16 windex);
void dwc2_port_resume(struct dwc2_hsotg *hsotg);
int dwc2_backup_host_registers(struct dwc2_hsotg *hsotg);
int dwc2_restore_host_registers(struct dwc2_hsotg *hsotg);
@@ -1495,7 +1495,8 @@ static inline void dwc2_hcd_start(struct dwc2_hsotg *hsotg) {}
static inline void dwc2_hcd_remove(struct dwc2_hsotg *hsotg) {}
static inline int dwc2_core_init(struct dwc2_hsotg *hsotg, bool initial_setup)
{ return 0; }
-static inline void dwc2_port_suspend(struct dwc2_hsotg *hsotg, u16 windex) {}
+static inline int dwc2_port_suspend(struct dwc2_hsotg *hsotg, u16 windex)
+{ return 0; }
static inline void dwc2_port_resume(struct dwc2_hsotg *hsotg) {}
static inline int dwc2_hcd_init(struct dwc2_hsotg *hsotg)
{ return 0; }