2019-05-22 10:04:30

by Christophe Leroy

[permalink] [raw]
Subject: [PATCH] net: phy: lxt: Add suspend/resume support to LXT971 and LXT973.

All LXT PHYs implement the standard "power down" bit 11 of
BMCR, so this patch adds support using the generic
genphy_{suspend,resume} functions.

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

Fixes: 0f0ca340e57b ("phy: power management support")
Signed-off-by: Christophe Leroy <[email protected]>
---
drivers/net/phy/lxt.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c
index 314486288119..356bd6472f49 100644
--- a/drivers/net/phy/lxt.c
+++ b/drivers/net/phy/lxt.c
@@ -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);
--
2.13.3


2019-05-22 18:28:23

by Heiner Kallweit

[permalink] [raw]
Subject: Re: [PATCH] net: phy: lxt: Add suspend/resume support to LXT971 and LXT973.

On 22.05.2019 12:01, Christophe Leroy wrote:
> All LXT PHYs implement the standard "power down" bit 11 of
> BMCR, so this patch adds support using the generic
> genphy_{suspend,resume} functions.
>
> LXT970 is left aside because all registers get cleared upon
> "power down" exit.
>
> Fixes: 0f0ca340e57b ("phy: power management support")
> Signed-off-by: Christophe Leroy <[email protected]>
The patch should be annotated net-next, and I would recommend
to remove the Fixes tag, because it doesn't fix an actual issue
and I see it rather as an improvement. Apart from that:

Reviewed-by: Heiner Kallweit <[email protected]>