]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd3a0d3e9dc42429f854876b14ff3477c6b5d543b
tree8e7259ac99c5eb5770a239b4f687ca14ea5d02c7
parent991a5e519c2aa1f4ed2bf6e2139997d7e7967cb3
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