]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: phy: lxt: Add suspend/resume support to LXT971 and LXT973.
authorChristophe Leroy <christophe.leroy@c-s.fr>
Thu, 23 May 2019 08:55:32 +0000 (08:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 May 2019 16:19:21 +0000 (09:19 -0700)
All LXT PHYs implement the standard "power down" bit 11 of
BMCR, so this patch adds support using the generic
genphy_{suspend,resume} functions added by
commit 6370fe8e2204 ("phy: power management support").

LXT970 is left aside because all registers get cleared upon
"power down" exit.

Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/lxt.c

index 31448628811929f063a379ac254771ea8dbd9f45..356bd6472f494c82a7bda2a924d2a4568b2ff554 100644 (file)
@@ -262,6 +262,8 @@ static struct phy_driver lxt97x_driver[] = {
        /* PHY_BASIC_FEATURES */
        .ack_interrupt  = lxt971_ack_interrupt,
        .config_intr    = lxt971_config_intr,
+       .suspend        = genphy_suspend,
+       .resume         = genphy_resume,
 }, {
        .phy_id         = 0x00137a10,
        .name           = "LXT973-A2",
@@ -271,6 +273,8 @@ static struct phy_driver lxt97x_driver[] = {
        .probe          = lxt973_probe,
        .config_aneg    = lxt973_config_aneg,
        .read_status    = lxt973a2_read_status,
+       .suspend        = genphy_suspend,
+       .resume         = genphy_resume,
 }, {
        .phy_id         = 0x00137a10,
        .name           = "LXT973",
@@ -279,6 +283,8 @@ static struct phy_driver lxt97x_driver[] = {
        .flags          = 0,
        .probe          = lxt973_probe,
        .config_aneg    = lxt973_config_aneg,
+       .suspend        = genphy_suspend,
+       .resume         = genphy_resume,
 } };
 
 module_phy_driver(lxt97x_driver);