aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/micrel.c
diff options
context:
space:
mode:
authorPatrice Vilchez <patrice.vilchez@atmel.com>2013-09-19 13:40:48 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-20 14:41:03 -0400
commit1a5465f5d6a23e84ef5c06cb32f3d8c26632f42a (patch)
tree71bf1a15322a0b505be7de2e2e3bca4c64b70b8d /drivers/net/phy/micrel.c
parentdf62cdf348c91baac61b4cb19d19ea1ef87b271e (diff)
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: Patrice Vilchez <patrice.vilchez@atmel.com> [b.brezillon@overkiz.com: adapt to newer kernel and generalize to other phys] Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com> [nicolas.ferre@atmel.com: commit message modification] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: David J. Choi <david.choi@micrel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/micrel.c')
-rw-r--r--drivers/net/phy/micrel.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index c31aad0004cb..3ae28f420868 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -287,6 +287,8 @@ static struct phy_driver ksphy_driver[] = {
287 .read_status = genphy_read_status, 287 .read_status = genphy_read_status,
288 .ack_interrupt = kszphy_ack_interrupt, 288 .ack_interrupt = kszphy_ack_interrupt,
289 .config_intr = ks8737_config_intr, 289 .config_intr = ks8737_config_intr,
290 .suspend = genphy_suspend,
291 .resume = genphy_resume,
290 .driver = { .owner = THIS_MODULE,}, 292 .driver = { .owner = THIS_MODULE,},
291}, { 293}, {
292 .phy_id = PHY_ID_KSZ8021, 294 .phy_id = PHY_ID_KSZ8021,
@@ -300,6 +302,8 @@ static struct phy_driver ksphy_driver[] = {
300 .read_status = genphy_read_status, 302 .read_status = genphy_read_status,
301 .ack_interrupt = kszphy_ack_interrupt, 303 .ack_interrupt = kszphy_ack_interrupt,
302 .config_intr = kszphy_config_intr, 304 .config_intr = kszphy_config_intr,
305 .suspend = genphy_suspend,
306 .resume = genphy_resume,
303 .driver = { .owner = THIS_MODULE,}, 307 .driver = { .owner = THIS_MODULE,},
304}, { 308}, {
305 .phy_id = PHY_ID_KSZ8031, 309 .phy_id = PHY_ID_KSZ8031,
@@ -313,6 +317,8 @@ static struct phy_driver ksphy_driver[] = {
313 .read_status = genphy_read_status, 317 .read_status = genphy_read_status,
314 .ack_interrupt = kszphy_ack_interrupt, 318 .ack_interrupt = kszphy_ack_interrupt,
315 .config_intr = kszphy_config_intr, 319 .config_intr = kszphy_config_intr,
320 .suspend = genphy_suspend,
321 .resume = genphy_resume,
316 .driver = { .owner = THIS_MODULE,}, 322 .driver = { .owner = THIS_MODULE,},
317}, { 323}, {
318 .phy_id = PHY_ID_KSZ8041, 324 .phy_id = PHY_ID_KSZ8041,
@@ -326,6 +332,8 @@ static struct phy_driver ksphy_driver[] = {
326 .read_status = genphy_read_status, 332 .read_status = genphy_read_status,
327 .ack_interrupt = kszphy_ack_interrupt, 333 .ack_interrupt = kszphy_ack_interrupt,
328 .config_intr = kszphy_config_intr, 334 .config_intr = kszphy_config_intr,
335 .suspend = genphy_suspend,
336 .resume = genphy_resume,
329 .driver = { .owner = THIS_MODULE,}, 337 .driver = { .owner = THIS_MODULE,},
330}, { 338}, {
331 .phy_id = PHY_ID_KSZ8051, 339 .phy_id = PHY_ID_KSZ8051,
@@ -339,6 +347,8 @@ static struct phy_driver ksphy_driver[] = {
339 .read_status = genphy_read_status, 347 .read_status = genphy_read_status,
340 .ack_interrupt = kszphy_ack_interrupt, 348 .ack_interrupt = kszphy_ack_interrupt,
341 .config_intr = kszphy_config_intr, 349 .config_intr = kszphy_config_intr,
350 .suspend = genphy_suspend,
351 .resume = genphy_resume,
342 .driver = { .owner = THIS_MODULE,}, 352 .driver = { .owner = THIS_MODULE,},
343}, { 353}, {
344 .phy_id = PHY_ID_KSZ8001, 354 .phy_id = PHY_ID_KSZ8001,
@@ -351,6 +361,8 @@ static struct phy_driver ksphy_driver[] = {
351 .read_status = genphy_read_status, 361 .read_status = genphy_read_status,
352 .ack_interrupt = kszphy_ack_interrupt, 362 .ack_interrupt = kszphy_ack_interrupt,
353 .config_intr = kszphy_config_intr, 363 .config_intr = kszphy_config_intr,
364 .suspend = genphy_suspend,
365 .resume = genphy_resume,
354 .driver = { .owner = THIS_MODULE,}, 366 .driver = { .owner = THIS_MODULE,},
355}, { 367}, {
356 .phy_id = PHY_ID_KSZ8081, 368 .phy_id = PHY_ID_KSZ8081,
@@ -363,6 +375,8 @@ static struct phy_driver ksphy_driver[] = {
363 .read_status = genphy_read_status, 375 .read_status = genphy_read_status,
364 .ack_interrupt = kszphy_ack_interrupt, 376 .ack_interrupt = kszphy_ack_interrupt,
365 .config_intr = kszphy_config_intr, 377 .config_intr = kszphy_config_intr,
378 .suspend = genphy_suspend,
379 .resume = genphy_resume,
366 .driver = { .owner = THIS_MODULE,}, 380 .driver = { .owner = THIS_MODULE,},
367}, { 381}, {
368 .phy_id = PHY_ID_KSZ8061, 382 .phy_id = PHY_ID_KSZ8061,
@@ -375,6 +389,8 @@ static struct phy_driver ksphy_driver[] = {
375 .read_status = genphy_read_status, 389 .read_status = genphy_read_status,
376 .ack_interrupt = kszphy_ack_interrupt, 390 .ack_interrupt = kszphy_ack_interrupt,
377 .config_intr = kszphy_config_intr, 391 .config_intr = kszphy_config_intr,
392 .suspend = genphy_suspend,
393 .resume = genphy_resume,
378 .driver = { .owner = THIS_MODULE,}, 394 .driver = { .owner = THIS_MODULE,},
379}, { 395}, {
380 .phy_id = PHY_ID_KSZ9021, 396 .phy_id = PHY_ID_KSZ9021,
@@ -387,6 +403,8 @@ static struct phy_driver ksphy_driver[] = {
387 .read_status = genphy_read_status, 403 .read_status = genphy_read_status,
388 .ack_interrupt = kszphy_ack_interrupt, 404 .ack_interrupt = kszphy_ack_interrupt,
389 .config_intr = ksz9021_config_intr, 405 .config_intr = ksz9021_config_intr,
406 .suspend = genphy_suspend,
407 .resume = genphy_resume,
390 .driver = { .owner = THIS_MODULE, }, 408 .driver = { .owner = THIS_MODULE, },
391}, { 409}, {
392 .phy_id = PHY_ID_KSZ9031, 410 .phy_id = PHY_ID_KSZ9031,
@@ -400,6 +418,8 @@ static struct phy_driver ksphy_driver[] = {
400 .read_status = genphy_read_status, 418 .read_status = genphy_read_status,
401 .ack_interrupt = kszphy_ack_interrupt, 419 .ack_interrupt = kszphy_ack_interrupt,
402 .config_intr = ksz9021_config_intr, 420 .config_intr = ksz9021_config_intr,
421 .suspend = genphy_suspend,
422 .resume = genphy_resume,
403 .driver = { .owner = THIS_MODULE, }, 423 .driver = { .owner = THIS_MODULE, },
404}, { 424}, {
405 .phy_id = PHY_ID_KSZ8873MLL, 425 .phy_id = PHY_ID_KSZ8873MLL,
@@ -410,6 +430,8 @@ static struct phy_driver ksphy_driver[] = {
410 .config_init = kszphy_config_init, 430 .config_init = kszphy_config_init,
411 .config_aneg = ksz8873mll_config_aneg, 431 .config_aneg = ksz8873mll_config_aneg,
412 .read_status = ksz8873mll_read_status, 432 .read_status = ksz8873mll_read_status,
433 .suspend = genphy_suspend,
434 .resume = genphy_resume,
413 .driver = { .owner = THIS_MODULE, }, 435 .driver = { .owner = THIS_MODULE, },
414}, { 436}, {
415 .phy_id = PHY_ID_KSZ886X, 437 .phy_id = PHY_ID_KSZ886X,
@@ -420,6 +442,8 @@ static struct phy_driver ksphy_driver[] = {
420 .config_init = kszphy_config_init, 442 .config_init = kszphy_config_init,
421 .config_aneg = genphy_config_aneg, 443 .config_aneg = genphy_config_aneg,
422 .read_status = genphy_read_status, 444 .read_status = genphy_read_status,
445 .suspend = genphy_suspend,
446 .resume = genphy_resume,
423 .driver = { .owner = THIS_MODULE, }, 447 .driver = { .owner = THIS_MODULE, },
424} }; 448} };
425 449