usb: dwc2: power on/off phy for peripheral mode in dual-role mode

The PHY power is handled for peripheral mode but only when the device is
forced into this peripheral mode. It is missing when the device is
operating in peripheral mode when dual-role mode is enabled, so let's
update the condition to match this scenario.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20221206-dwc2-gadget-dual-role-v1-2-36515e1092cd@theobroma-systems.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Quentin Schulz 2022-12-07 14:19:17 +01:00 • committed by Greg Kroah-Hartman
commit ade23d7b7e
2 changed files with 6 additions and 3 deletions