usb: dwc2: power on/off phy for peripheral mode in dual-role mode
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Wed, 7 Dec 2022 13:19:17 +0000 (14:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 15:50:56 +0000 (16:50 +0100)
commitade23d7b7ec5c38bd43ec44ccb753cb7ea8ac08a
tree8e1cc9d1ca19fbc29354c088d69483294e9cec4e
parent42a317d076b58f08413219b1679d211783c2e5f3
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>
drivers/usb/dwc2/gadget.c
drivers/usb/dwc2/platform.c