aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/timberdale.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-04-07 19:23:57 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-05-26 13:45:05 -0400
commit3271d382c3ffe61ef3d059ef47e635dbe031030e (patch)
tree2612b0030f0fd85ffe7722cbf195ac061a3eaf76 /drivers/mfd/timberdale.c
parent7dc00a0d14992d0083fefccad7839ac837ea55bc (diff)
mfd: Use mfd cell platform_data for timberdale cells platform bits
With the addition of a device platform mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers. Acked-by: Richard Röjfors <richard.rojfors@pelagicore.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/timberdale.c')
-rw-r--r--drivers/mfd/timberdale.c81
1 files changed, 54 insertions, 27 deletions
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index 94c6c8afad12..69272e4e3459 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -384,7 +384,8 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
384 .name = "timb-dma", 384 .name = "timb-dma",
385 .num_resources = ARRAY_SIZE(timberdale_dma_resources), 385 .num_resources = ARRAY_SIZE(timberdale_dma_resources),
386 .resources = timberdale_dma_resources, 386 .resources = timberdale_dma_resources,
387 .mfd_data = &timb_dma_platform_data, 387 .platform_data = &timb_dma_platform_data,
388 .pdata_size = sizeof(timb_dma_platform_data),
388 }, 389 },
389 { 390 {
390 .name = "timb-uart", 391 .name = "timb-uart",
@@ -395,37 +396,43 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
395 .name = "xiic-i2c", 396 .name = "xiic-i2c",
396 .num_resources = ARRAY_SIZE(timberdale_xiic_resources), 397 .num_resources = ARRAY_SIZE(timberdale_xiic_resources),
397 .resources = timberdale_xiic_resources, 398 .resources = timberdale_xiic_resources,
398 .mfd_data = &timberdale_xiic_platform_data, 399 .platform_data = &timberdale_xiic_platform_data,
400 .pdata_size = sizeof(timberdale_xiic_platform_data),
399 }, 401 },
400 { 402 {
401 .name = "timb-gpio", 403 .name = "timb-gpio",
402 .num_resources = ARRAY_SIZE(timberdale_gpio_resources), 404 .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
403 .resources = timberdale_gpio_resources, 405 .resources = timberdale_gpio_resources,
404 .mfd_data = &timberdale_gpio_platform_data, 406 .platform_data = &timberdale_gpio_platform_data,
407 .pdata_size = sizeof(timberdale_gpio_platform_data),
405 }, 408 },
406 { 409 {
407 .name = "timb-video", 410 .name = "timb-video",
408 .num_resources = ARRAY_SIZE(timberdale_video_resources), 411 .num_resources = ARRAY_SIZE(timberdale_video_resources),
409 .resources = timberdale_video_resources, 412 .resources = timberdale_video_resources,
410 .mfd_data = &timberdale_video_platform_data, 413 .platform_data = &timberdale_video_platform_data,
414 .pdata_size = sizeof(timberdale_video_platform_data),
411 }, 415 },
412 { 416 {
413 .name = "timb-radio", 417 .name = "timb-radio",
414 .num_resources = ARRAY_SIZE(timberdale_radio_resources), 418 .num_resources = ARRAY_SIZE(timberdale_radio_resources),
415 .resources = timberdale_radio_resources, 419 .resources = timberdale_radio_resources,
416 .mfd_data = &timberdale_radio_platform_data, 420 .platform_data = &timberdale_radio_platform_data,
421 .pdata_size = sizeof(timberdale_radio_platform_data),
417 }, 422 },
418 { 423 {
419 .name = "xilinx_spi", 424 .name = "xilinx_spi",
420 .num_resources = ARRAY_SIZE(timberdale_spi_resources), 425 .num_resources = ARRAY_SIZE(timberdale_spi_resources),
421 .resources = timberdale_spi_resources, 426 .resources = timberdale_spi_resources,
422 .mfd_data = &timberdale_xspi_platform_data, 427 .platform_data = &timberdale_xspi_platform_data,
428 .pdata_size = sizeof(timberdale_xspi_platform_data),
423 }, 429 },
424 { 430 {
425 .name = "ks8842", 431 .name = "ks8842",
426 .num_resources = ARRAY_SIZE(timberdale_eth_resources), 432 .num_resources = ARRAY_SIZE(timberdale_eth_resources),
427 .resources = timberdale_eth_resources, 433 .resources = timberdale_eth_resources,
428 .mfd_data = &timberdale_ks8842_platform_data, 434 .platform_data = &timberdale_ks8842_platform_data,
435 .pdata_size = sizeof(timberdale_ks8842_platform_data),
429 }, 436 },
430}; 437};
431 438
@@ -434,7 +441,8 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
434 .name = "timb-dma", 441 .name = "timb-dma",
435 .num_resources = ARRAY_SIZE(timberdale_dma_resources), 442 .num_resources = ARRAY_SIZE(timberdale_dma_resources),
436 .resources = timberdale_dma_resources, 443 .resources = timberdale_dma_resources,
437 .mfd_data = &timb_dma_platform_data, 444 .platform_data = &timb_dma_platform_data,
445 .pdata_size = sizeof(timb_dma_platform_data),
438 }, 446 },
439 { 447 {
440 .name = "timb-uart", 448 .name = "timb-uart",
@@ -450,13 +458,15 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
450 .name = "xiic-i2c", 458 .name = "xiic-i2c",
451 .num_resources = ARRAY_SIZE(timberdale_xiic_resources), 459 .num_resources = ARRAY_SIZE(timberdale_xiic_resources),
452 .resources = timberdale_xiic_resources, 460 .resources = timberdale_xiic_resources,
453 .mfd_data = &timberdale_xiic_platform_data, 461 .platform_data = &timberdale_xiic_platform_data,
462 .pdata_size = sizeof(timberdale_xiic_platform_data),
454 }, 463 },
455 { 464 {
456 .name = "timb-gpio", 465 .name = "timb-gpio",
457 .num_resources = ARRAY_SIZE(timberdale_gpio_resources), 466 .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
458 .resources = timberdale_gpio_resources, 467 .resources = timberdale_gpio_resources,
459 .mfd_data = &timberdale_gpio_platform_data, 468 .platform_data = &timberdale_gpio_platform_data,
469 .pdata_size = sizeof(timberdale_gpio_platform_data),
460 }, 470 },
461 { 471 {
462 .name = "timb-mlogicore", 472 .name = "timb-mlogicore",
@@ -467,25 +477,29 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
467 .name = "timb-video", 477 .name = "timb-video",
468 .num_resources = ARRAY_SIZE(timberdale_video_resources), 478 .num_resources = ARRAY_SIZE(timberdale_video_resources),
469 .resources = timberdale_video_resources, 479 .resources = timberdale_video_resources,
470 .mfd_data = &timberdale_video_platform_data, 480 .platform_data = &timberdale_video_platform_data,
481 .pdata_size = sizeof(timberdale_video_platform_data),
471 }, 482 },
472 { 483 {
473 .name = "timb-radio", 484 .name = "timb-radio",
474 .num_resources = ARRAY_SIZE(timberdale_radio_resources), 485 .num_resources = ARRAY_SIZE(timberdale_radio_resources),
475 .resources = timberdale_radio_resources, 486 .resources = timberdale_radio_resources,
476 .mfd_data = &timberdale_radio_platform_data, 487 .platform_data = &timberdale_radio_platform_data,
488 .pdata_size = sizeof(timberdale_radio_platform_data),
477 }, 489 },
478 { 490 {
479 .name = "xilinx_spi", 491 .name = "xilinx_spi",
480 .num_resources = ARRAY_SIZE(timberdale_spi_resources), 492 .num_resources = ARRAY_SIZE(timberdale_spi_resources),
481 .resources = timberdale_spi_resources, 493 .resources = timberdale_spi_resources,
482 .mfd_data = &timberdale_xspi_platform_data, 494 .platform_data = &timberdale_xspi_platform_data,
495 .pdata_size = sizeof(timberdale_xspi_platform_data),
483 }, 496 },
484 { 497 {
485 .name = "ks8842", 498 .name = "ks8842",
486 .num_resources = ARRAY_SIZE(timberdale_eth_resources), 499 .num_resources = ARRAY_SIZE(timberdale_eth_resources),
487 .resources = timberdale_eth_resources, 500 .resources = timberdale_eth_resources,
488 .mfd_data = &timberdale_ks8842_platform_data, 501 .platform_data = &timberdale_ks8842_platform_data,
502 .pdata_size = sizeof(timberdale_ks8842_platform_data),
489 }, 503 },
490}; 504};
491 505
@@ -494,7 +508,8 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
494 .name = "timb-dma", 508 .name = "timb-dma",
495 .num_resources = ARRAY_SIZE(timberdale_dma_resources), 509 .num_resources = ARRAY_SIZE(timberdale_dma_resources),
496 .resources = timberdale_dma_resources, 510 .resources = timberdale_dma_resources,
497 .mfd_data = &timb_dma_platform_data, 511 .platform_data = &timb_dma_platform_data,
512 .pdata_size = sizeof(timb_dma_platform_data),
498 }, 513 },
499 { 514 {
500 .name = "timb-uart", 515 .name = "timb-uart",
@@ -505,31 +520,36 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
505 .name = "xiic-i2c", 520 .name = "xiic-i2c",
506 .num_resources = ARRAY_SIZE(timberdale_xiic_resources), 521 .num_resources = ARRAY_SIZE(timberdale_xiic_resources),
507 .resources = timberdale_xiic_resources, 522 .resources = timberdale_xiic_resources,
508 .mfd_data = &timberdale_xiic_platform_data, 523 .platform_data = &timberdale_xiic_platform_data,
524 .pdata_size = sizeof(timberdale_xiic_platform_data),
509 }, 525 },
510 { 526 {
511 .name = "timb-gpio", 527 .name = "timb-gpio",
512 .num_resources = ARRAY_SIZE(timberdale_gpio_resources), 528 .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
513 .resources = timberdale_gpio_resources, 529 .resources = timberdale_gpio_resources,
514 .mfd_data = &timberdale_gpio_platform_data, 530 .platform_data = &timberdale_gpio_platform_data,
531 .pdata_size = sizeof(timberdale_gpio_platform_data),
515 }, 532 },
516 { 533 {
517 .name = "timb-video", 534 .name = "timb-video",
518 .num_resources = ARRAY_SIZE(timberdale_video_resources), 535 .num_resources = ARRAY_SIZE(timberdale_video_resources),
519 .resources = timberdale_video_resources, 536 .resources = timberdale_video_resources,
520 .mfd_data = &timberdale_video_platform_data, 537 .platform_data = &timberdale_video_platform_data,
538 .pdata_size = sizeof(timberdale_video_platform_data),
521 }, 539 },
522 { 540 {
523 .name = "timb-radio", 541 .name = "timb-radio",
524 .num_resources = ARRAY_SIZE(timberdale_radio_resources), 542 .num_resources = ARRAY_SIZE(timberdale_radio_resources),
525 .resources = timberdale_radio_resources, 543 .resources = timberdale_radio_resources,
526 .mfd_data = &timberdale_radio_platform_data, 544 .platform_data = &timberdale_radio_platform_data,
545 .pdata_size = sizeof(timberdale_radio_platform_data),
527 }, 546 },
528 { 547 {
529 .name = "xilinx_spi", 548 .name = "xilinx_spi",
530 .num_resources = ARRAY_SIZE(timberdale_spi_resources), 549 .num_resources = ARRAY_SIZE(timberdale_spi_resources),
531 .resources = timberdale_spi_resources, 550 .resources = timberdale_spi_resources,
532 .mfd_data = &timberdale_xspi_platform_data, 551 .platform_data = &timberdale_xspi_platform_data,
552 .pdata_size = sizeof(timberdale_xspi_platform_data),
533 }, 553 },
534}; 554};
535 555
@@ -538,7 +558,8 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
538 .name = "timb-dma", 558 .name = "timb-dma",
539 .num_resources = ARRAY_SIZE(timberdale_dma_resources), 559 .num_resources = ARRAY_SIZE(timberdale_dma_resources),
540 .resources = timberdale_dma_resources, 560 .resources = timberdale_dma_resources,
541 .mfd_data = &timb_dma_platform_data, 561 .platform_data = &timb_dma_platform_data,
562 .pdata_size = sizeof(timb_dma_platform_data),
542 }, 563 },
543 { 564 {
544 .name = "timb-uart", 565 .name = "timb-uart",
@@ -549,37 +570,43 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
549 .name = "ocores-i2c", 570 .name = "ocores-i2c",
550 .num_resources = ARRAY_SIZE(timberdale_ocores_resources), 571 .num_resources = ARRAY_SIZE(timberdale_ocores_resources),
551 .resources = timberdale_ocores_resources, 572 .resources = timberdale_ocores_resources,
552 .mfd_data = &timberdale_ocores_platform_data, 573 .platform_data = &timberdale_ocores_platform_data,
574 .pdata_size = sizeof(timberdale_ocores_platform_data),
553 }, 575 },
554 { 576 {
555 .name = "timb-gpio", 577 .name = "timb-gpio",
556 .num_resources = ARRAY_SIZE(timberdale_gpio_resources), 578 .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
557 .resources = timberdale_gpio_resources, 579 .resources = timberdale_gpio_resources,
558 .mfd_data = &timberdale_gpio_platform_data, 580 .platform_data = &timberdale_gpio_platform_data,
581 .pdata_size = sizeof(timberdale_gpio_platform_data),
559 }, 582 },
560 { 583 {
561 .name = "timb-video", 584 .name = "timb-video",
562 .num_resources = ARRAY_SIZE(timberdale_video_resources), 585 .num_resources = ARRAY_SIZE(timberdale_video_resources),
563 .resources = timberdale_video_resources, 586 .resources = timberdale_video_resources,
564 .mfd_data = &timberdale_video_platform_data, 587 .platform_data = &timberdale_video_platform_data,
588 .pdata_size = sizeof(timberdale_video_platform_data),
565 }, 589 },
566 { 590 {
567 .name = "timb-radio", 591 .name = "timb-radio",
568 .num_resources = ARRAY_SIZE(timberdale_radio_resources), 592 .num_resources = ARRAY_SIZE(timberdale_radio_resources),
569 .resources = timberdale_radio_resources, 593 .resources = timberdale_radio_resources,
570 .mfd_data = &timberdale_radio_platform_data, 594 .platform_data = &timberdale_radio_platform_data,
595 .pdata_size = sizeof(timberdale_radio_platform_data),
571 }, 596 },
572 { 597 {
573 .name = "xilinx_spi", 598 .name = "xilinx_spi",
574 .num_resources = ARRAY_SIZE(timberdale_spi_resources), 599 .num_resources = ARRAY_SIZE(timberdale_spi_resources),
575 .resources = timberdale_spi_resources, 600 .resources = timberdale_spi_resources,
576 .mfd_data = &timberdale_xspi_platform_data, 601 .platform_data = &timberdale_xspi_platform_data,
602 .pdata_size = sizeof(timberdale_xspi_platform_data),
577 }, 603 },
578 { 604 {
579 .name = "ks8842", 605 .name = "ks8842",
580 .num_resources = ARRAY_SIZE(timberdale_eth_resources), 606 .num_resources = ARRAY_SIZE(timberdale_eth_resources),
581 .resources = timberdale_eth_resources, 607 .resources = timberdale_eth_resources,
582 .mfd_data = &timberdale_ks8842_platform_data, 608 .platform_data = &timberdale_ks8842_platform_data,
609 .pdata_size = sizeof(timberdale_ks8842_platform_data),
583 }, 610 },
584}; 611};
585 612