diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2018-05-24 22:40:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-28 23:01:56 -0400 |
commit | 049ff57a2aa6ead1daf16b4d11da44ed17bdb0b5 (patch) | |
tree | a247ac32d6e688cead462acda35a62ea2cef2233 /drivers/net/phy | |
parent | deeaf1f82cdafa12d77226320fd3e4d299fe9b04 (diff) |
net: phy: realtek: add suspend/resume callbacks for RTL8211B
Add RTL8211B suspend / resume callbacks.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/realtek.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 9f48ecf9c627..082fb40c656d 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -145,6 +145,20 @@ static int rtl8211f_config_init(struct phy_device *phydev) return phy_modify_paged(phydev, 0xd08, 0x11, RTL8211F_TX_DELAY, val); } +static int rtl8211b_suspend(struct phy_device *phydev) +{ + phy_write(phydev, MII_MMD_DATA, BIT(9)); + + return genphy_suspend(phydev); +} + +static int rtl8211b_resume(struct phy_device *phydev) +{ + phy_write(phydev, MII_MMD_DATA, 0); + + return genphy_resume(phydev); +} + static struct phy_driver realtek_drvs[] = { { .phy_id = 0x00008201, @@ -174,6 +188,8 @@ static struct phy_driver realtek_drvs[] = { .config_intr = &rtl8211b_config_intr, .read_mmd = &genphy_read_mmd_unsupported, .write_mmd = &genphy_write_mmd_unsupported, + .suspend = rtl8211b_suspend, + .resume = rtl8211b_resume, }, { .phy_id = 0x001cc914, .name = "RTL8211DN Gigabit Ethernet", |