* [PATCH net-next] net: phy: aquantia: add suspend / resume callbacks for AQR107 family
@ 2019-03-29 20:09 Heiner Kallweit
2019-03-29 21:14 ` Florian Fainelli
2019-04-01 22:03 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Heiner Kallweit @ 2019-03-29 20:09 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev
Add suspend / resume callbacks for AQR107 family. Suspend powers down
the complete chip except MDIO and internal CPU.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/aquantia_main.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c
index ae6a76d3f..be5204a1f 100644
--- a/drivers/net/phy/aquantia_main.c
+++ b/drivers/net/phy/aquantia_main.c
@@ -478,6 +478,18 @@ static void aqr107_link_change_notify(struct phy_device *phydev)
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[] = {
{
PHY_ID_MATCH_MODEL(PHY_ID_AQ1202),
@@ -532,6 +544,8 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr107_read_status,
.get_tunable = aqr107_get_tunable,
.set_tunable = aqr107_set_tunable,
+ .suspend = aqr107_suspend,
+ .resume = aqr107_resume,
.link_change_notify = aqr107_link_change_notify,
},
{
@@ -547,6 +561,8 @@ static struct phy_driver aqr_driver[] = {
.read_status = aqr107_read_status,
.get_tunable = aqr107_get_tunable,
.set_tunable = aqr107_set_tunable,
+ .suspend = aqr107_suspend,
+ .resume = aqr107_resume,
.link_change_notify = aqr107_link_change_notify,
},
{
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phy: aquantia: add suspend / resume callbacks for AQR107 family
2019-03-29 20:09 [PATCH net-next] net: phy: aquantia: add suspend / resume callbacks for AQR107 family Heiner Kallweit
@ 2019-03-29 21:14 ` Florian Fainelli
2019-04-01 22:03 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2019-03-29 21:14 UTC (permalink / raw)
To: Heiner Kallweit, Andrew Lunn, David Miller; +Cc: netdev
On 3/29/19 1:09 PM, Heiner Kallweit wrote:
> Add suspend / resume callbacks for AQR107 family. Suspend powers down
> the complete chip except MDIO and internal CPU.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phy: aquantia: add suspend / resume callbacks for AQR107 family
2019-03-29 20:09 [PATCH net-next] net: phy: aquantia: add suspend / resume callbacks for AQR107 family Heiner Kallweit
2019-03-29 21:14 ` Florian Fainelli
@ 2019-04-01 22:03 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-04-01 22:03 UTC (permalink / raw)
To: hkallweit1; +Cc: andrew, f.fainelli, netdev
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Fri, 29 Mar 2019 21:09:27 +0100
> Add suspend / resume callbacks for AQR107 family. Suspend powers down
> the complete chip except MDIO and internal CPU.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-01 22:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 20:09 [PATCH net-next] net: phy: aquantia: add suspend / resume callbacks for AQR107 family Heiner Kallweit
2019-03-29 21:14 ` Florian Fainelli
2019-04-01 22:03 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.