phy: usb: Leave some clocks running during suspend
authorAl Cooper <alcooperx@gmail.com>
Wed, 1 Dec 2021 18:06:51 +0000 (13:06 -0500)
committerVinod Koul <vkoul@kernel.org>
Sun, 23 Jan 2022 14:03:15 +0000 (19:33 +0530)
commit42fed57046fc74586d7058bd51a1c10ac9c690cb
tree8e7259ac99c5eb5770a239b4f687ca14ea5d02c7
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07
phy: usb: Leave some clocks running during suspend

The PHY client driver does a phy_exit() call on suspend or rmmod and
the PHY driver needs to know the difference because some clocks need
to be kept running for suspend but can be shutdown on unbind/rmmod
(or if there are no PHY clients at all).

The fix is to use a PM notifier so the driver can tell if a PHY
client is calling exit() because of a system suspend or a driver
unbind/rmmod.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211201180653.35097-2-alcooperx@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/broadcom/phy-brcm-usb.c