Commit ac9e81c2 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

net: phy: aquantia: add suspend / resume callbacks for AQR107 family

Add suspend / resume callbacks for AQR107 family. Suspend powers down
the complete chip except MDIO and internal CPU.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 191aeea4
...@@ -478,6 +478,18 @@ static void aqr107_link_change_notify(struct phy_device *phydev) ...@@ -478,6 +478,18 @@ static void aqr107_link_change_notify(struct phy_device *phydev)
phydev_info(phydev, "Aquantia 1000Base-T2 mode active\n"); phydev_info(phydev, "Aquantia 1000Base-T2 mode active\n");
} }
static int aqr107_suspend(struct phy_device *phydev)
{
return phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, MDIO_CTRL1,
MDIO_CTRL1_LPOWER);
}
static int aqr107_resume(struct phy_device *phydev)
{
return phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1, MDIO_CTRL1,
MDIO_CTRL1_LPOWER);
}
static struct phy_driver aqr_driver[] = { static struct phy_driver aqr_driver[] = {
{ {
PHY_ID_MATCH_MODEL(PHY_ID_AQ1202), PHY_ID_MATCH_MODEL(PHY_ID_AQ1202),
...@@ -532,6 +544,8 @@ static struct phy_driver aqr_driver[] = { ...@@ -532,6 +544,8 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr107_read_status, .read_status = aqr107_read_status,
.get_tunable = aqr107_get_tunable, .get_tunable = aqr107_get_tunable,
.set_tunable = aqr107_set_tunable, .set_tunable = aqr107_set_tunable,
.suspend = aqr107_suspend,
.resume = aqr107_resume,
.link_change_notify = aqr107_link_change_notify, .link_change_notify = aqr107_link_change_notify,
}, },
{ {
...@@ -547,6 +561,8 @@ static struct phy_driver aqr_driver[] = { ...@@ -547,6 +561,8 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr107_read_status, .read_status = aqr107_read_status,
.get_tunable = aqr107_get_tunable, .get_tunable = aqr107_get_tunable,
.set_tunable = aqr107_set_tunable, .set_tunable = aqr107_set_tunable,
.suspend = aqr107_suspend,
.resume = aqr107_resume,
.link_change_notify = aqr107_link_change_notify, .link_change_notify = aqr107_link_change_notify,
}, },
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment