提交 1a5465f5 编写于 作者: P Patrice Vilchez 提交者: David S. Miller

phy/micrel: Add suspend/resume support to Micrel PHYs

All supported Micrel PHYs implement the standard "power down" bit 11 of BMCR,
so this patch adds support using the generic genphy_{suspend,resume} functions.
Signed-off-by: NPatrice Vilchez <patrice.vilchez@atmel.com>
[b.brezillon@overkiz.com: adapt to newer kernel and generalize to other phys]
Signed-off-by: NBoris BREZILLON <b.brezillon@overkiz.com>
[nicolas.ferre@atmel.com: commit message modification]
Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
Cc: David J. Choi <david.choi@micrel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 df62cdf3
...@@ -287,6 +287,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -287,6 +287,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt, .ack_interrupt = kszphy_ack_interrupt,
.config_intr = ks8737_config_intr, .config_intr = ks8737_config_intr,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE,}, .driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8021, .phy_id = PHY_ID_KSZ8021,
...@@ -300,6 +302,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -300,6 +302,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt, .ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr, .config_intr = kszphy_config_intr,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE,}, .driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8031, .phy_id = PHY_ID_KSZ8031,
...@@ -313,6 +317,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -313,6 +317,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt, .ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr, .config_intr = kszphy_config_intr,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE,}, .driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8041, .phy_id = PHY_ID_KSZ8041,
...@@ -326,6 +332,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -326,6 +332,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt, .ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr, .config_intr = kszphy_config_intr,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE,}, .driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8051, .phy_id = PHY_ID_KSZ8051,
...@@ -339,6 +347,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -339,6 +347,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt, .ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr, .config_intr = kszphy_config_intr,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE,}, .driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8001, .phy_id = PHY_ID_KSZ8001,
...@@ -351,6 +361,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -351,6 +361,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt, .ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr, .config_intr = kszphy_config_intr,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE,}, .driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8081, .phy_id = PHY_ID_KSZ8081,
...@@ -363,6 +375,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -363,6 +375,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt, .ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr, .config_intr = kszphy_config_intr,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE,}, .driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8061, .phy_id = PHY_ID_KSZ8061,
...@@ -375,6 +389,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -375,6 +389,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt, .ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr, .config_intr = kszphy_config_intr,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE,}, .driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ9021, .phy_id = PHY_ID_KSZ9021,
...@@ -387,6 +403,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -387,6 +403,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt, .ack_interrupt = kszphy_ack_interrupt,
.config_intr = ksz9021_config_intr, .config_intr = ksz9021_config_intr,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE, }, .driver = { .owner = THIS_MODULE, },
}, { }, {
.phy_id = PHY_ID_KSZ9031, .phy_id = PHY_ID_KSZ9031,
...@@ -400,6 +418,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -400,6 +418,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt, .ack_interrupt = kszphy_ack_interrupt,
.config_intr = ksz9021_config_intr, .config_intr = ksz9021_config_intr,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE, }, .driver = { .owner = THIS_MODULE, },
}, { }, {
.phy_id = PHY_ID_KSZ8873MLL, .phy_id = PHY_ID_KSZ8873MLL,
...@@ -410,6 +430,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -410,6 +430,8 @@ static struct phy_driver ksphy_driver[] = {
.config_init = kszphy_config_init, .config_init = kszphy_config_init,
.config_aneg = ksz8873mll_config_aneg, .config_aneg = ksz8873mll_config_aneg,
.read_status = ksz8873mll_read_status, .read_status = ksz8873mll_read_status,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE, }, .driver = { .owner = THIS_MODULE, },
}, { }, {
.phy_id = PHY_ID_KSZ886X, .phy_id = PHY_ID_KSZ886X,
...@@ -420,6 +442,8 @@ static struct phy_driver ksphy_driver[] = { ...@@ -420,6 +442,8 @@ static struct phy_driver ksphy_driver[] = {
.config_init = kszphy_config_init, .config_init = kszphy_config_init,
.config_aneg = genphy_config_aneg, .config_aneg = genphy_config_aneg,
.read_status = genphy_read_status, .read_status = genphy_read_status,
.suspend = genphy_suspend,
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE, }, .driver = { .owner = THIS_MODULE, },
} }; } };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册