]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc2: Add host partial power down functions
authorArtur Petrosyan <Arthur.Petrosyan@synopsys.com>
Thu, 8 Apr 2021 09:44:37 +0000 (13:44 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Apr 2021 13:16:38 +0000 (15:16 +0200)
commita01aa71a30cd3db1cb5144f7c99d54bccb9b440e
treebe26860acc78bf8556ef3d37eeea59eea4a14405
parent6127a3ab472e4d7c905221c37cc72994d86e5461
usb: dwc2: Add host partial power down functions

For host mode Partial Power Down entering and exiting
separate functions are needed to implement the logic.
Earlier the logic was implemented in one function. Which was
confusing the readability. Also both host and device implementations
were in the same function.

- Added host partial power down functions which must be called
by dwc2_enter_partial_power_down()/dwc2_exit_partial_power_down()
functions.

Added function names:
dwc2_host_enter_partial_power_down()
dwc2_host_exit_partial_power_down()

NOTE: There is a checkpatch "CHECK" warning on "udelay(100)".
The delay is needed to properly exit gadget Partial Power Down
A delay less than 100 doesn't work.

Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Link: https://lore.kernel.org/r/20210408094438.56CFBA022E@mailhost.synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/core.h
drivers/usb/dwc2/hcd.c