diff options
author | Mattias Wallin <mattias.wallin@stericsson.com> | 2010-12-02 09:40:31 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-14 06:37:47 -0500 |
commit | e098aded79f24e2024139e82f778ff9db6dc142a (patch) | |
tree | 9a8e55da30e25ddf10f1476dfc4c4c9467efe800 /drivers/mfd | |
parent | 4f079985b2caacfda5103dd85fb028a2848c84ab (diff) |
mfd: ab8500-core ioresources irq for subdrivers added
This patch adds the ioresources used by subdrivers to
retrieve their interrupt.
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/ab8500-core.c | 206 |
1 files changed, 199 insertions, 7 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index e464e94c4bc..7f01a3a1d10 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c | |||
@@ -397,13 +397,189 @@ static struct resource ab8500_poweronkey_db_resources[] = { | |||
397 | }, | 397 | }, |
398 | }; | 398 | }; |
399 | 399 | ||
400 | static struct resource ab8500_bm_resources[] = { | ||
401 | { | ||
402 | .name = "MAIN_EXT_CH_NOT_OK", | ||
403 | .start = AB8500_INT_MAIN_EXT_CH_NOT_OK, | ||
404 | .end = AB8500_INT_MAIN_EXT_CH_NOT_OK, | ||
405 | .flags = IORESOURCE_IRQ, | ||
406 | }, | ||
407 | { | ||
408 | .name = "BATT_OVV", | ||
409 | .start = AB8500_INT_BATT_OVV, | ||
410 | .end = AB8500_INT_BATT_OVV, | ||
411 | .flags = IORESOURCE_IRQ, | ||
412 | }, | ||
413 | { | ||
414 | .name = "MAIN_CH_UNPLUG_DET", | ||
415 | .start = AB8500_INT_MAIN_CH_UNPLUG_DET, | ||
416 | .end = AB8500_INT_MAIN_CH_UNPLUG_DET, | ||
417 | .flags = IORESOURCE_IRQ, | ||
418 | }, | ||
419 | { | ||
420 | .name = "MAIN_CHARGE_PLUG_DET", | ||
421 | .start = AB8500_INT_MAIN_CH_PLUG_DET, | ||
422 | .end = AB8500_INT_MAIN_CH_PLUG_DET, | ||
423 | .flags = IORESOURCE_IRQ, | ||
424 | }, | ||
425 | { | ||
426 | .name = "VBUS_DET_F", | ||
427 | .start = AB8500_INT_VBUS_DET_F, | ||
428 | .end = AB8500_INT_VBUS_DET_F, | ||
429 | .flags = IORESOURCE_IRQ, | ||
430 | }, | ||
431 | { | ||
432 | .name = "VBUS_DET_R", | ||
433 | .start = AB8500_INT_VBUS_DET_R, | ||
434 | .end = AB8500_INT_VBUS_DET_R, | ||
435 | .flags = IORESOURCE_IRQ, | ||
436 | }, | ||
437 | { | ||
438 | .name = "BAT_CTRL_INDB", | ||
439 | .start = AB8500_INT_BAT_CTRL_INDB, | ||
440 | .end = AB8500_INT_BAT_CTRL_INDB, | ||
441 | .flags = IORESOURCE_IRQ, | ||
442 | }, | ||
443 | { | ||
444 | .name = "CH_WD_EXP", | ||
445 | .start = AB8500_INT_CH_WD_EXP, | ||
446 | .end = AB8500_INT_CH_WD_EXP, | ||
447 | .flags = IORESOURCE_IRQ, | ||
448 | }, | ||
449 | { | ||
450 | .name = "VBUS_OVV", | ||
451 | .start = AB8500_INT_VBUS_OVV, | ||
452 | .end = AB8500_INT_VBUS_OVV, | ||
453 | .flags = IORESOURCE_IRQ, | ||
454 | }, | ||
455 | { | ||
456 | .name = "NCONV_ACCU", | ||
457 | .start = AB8500_INT_CCN_CONV_ACC, | ||
458 | .end = AB8500_INT_CCN_CONV_ACC, | ||
459 | .flags = IORESOURCE_IRQ, | ||
460 | }, | ||
461 | { | ||
462 | .name = "LOW_BAT_F", | ||
463 | .start = AB8500_INT_LOW_BAT_F, | ||
464 | .end = AB8500_INT_LOW_BAT_F, | ||
465 | .flags = IORESOURCE_IRQ, | ||
466 | }, | ||
467 | { | ||
468 | .name = "LOW_BAT_R", | ||
469 | .start = AB8500_INT_LOW_BAT_R, | ||
470 | .end = AB8500_INT_LOW_BAT_R, | ||
471 | .flags = IORESOURCE_IRQ, | ||
472 | }, | ||
473 | { | ||
474 | .name = "BTEMP_LOW", | ||
475 | .start = AB8500_INT_BTEMP_LOW, | ||
476 | .end = AB8500_INT_BTEMP_LOW, | ||
477 | .flags = IORESOURCE_IRQ, | ||
478 | }, | ||
479 | { | ||
480 | .name = "BTEMP_HIGH", | ||
481 | .start = AB8500_INT_BTEMP_HIGH, | ||
482 | .end = AB8500_INT_BTEMP_HIGH, | ||
483 | .flags = IORESOURCE_IRQ, | ||
484 | }, | ||
485 | { | ||
486 | .name = "USB_CHARGER_NOT_OKR", | ||
487 | .start = AB8500_INT_USB_CHARGER_NOT_OK, | ||
488 | .end = AB8500_INT_USB_CHARGER_NOT_OK, | ||
489 | .flags = IORESOURCE_IRQ, | ||
490 | }, | ||
491 | { | ||
492 | .name = "USB_CHARGE_DET_DONE", | ||
493 | .start = AB8500_INT_USB_CHG_DET_DONE, | ||
494 | .end = AB8500_INT_USB_CHG_DET_DONE, | ||
495 | .flags = IORESOURCE_IRQ, | ||
496 | }, | ||
497 | { | ||
498 | .name = "USB_CH_TH_PROT_R", | ||
499 | .start = AB8500_INT_USB_CH_TH_PROT_R, | ||
500 | .end = AB8500_INT_USB_CH_TH_PROT_R, | ||
501 | .flags = IORESOURCE_IRQ, | ||
502 | }, | ||
503 | { | ||
504 | .name = "MAIN_CH_TH_PROT_R", | ||
505 | .start = AB8500_INT_MAIN_CH_TH_PROT_R, | ||
506 | .end = AB8500_INT_MAIN_CH_TH_PROT_R, | ||
507 | .flags = IORESOURCE_IRQ, | ||
508 | }, | ||
509 | { | ||
510 | .name = "USB_CHARGER_NOT_OKF", | ||
511 | .start = AB8500_INT_USB_CHARGER_NOT_OKF, | ||
512 | .end = AB8500_INT_USB_CHARGER_NOT_OKF, | ||
513 | .flags = IORESOURCE_IRQ, | ||
514 | }, | ||
515 | }; | ||
516 | |||
517 | static struct resource ab8500_debug_resources[] = { | ||
518 | { | ||
519 | .name = "IRQ_FIRST", | ||
520 | .start = AB8500_INT_MAIN_EXT_CH_NOT_OK, | ||
521 | .end = AB8500_INT_MAIN_EXT_CH_NOT_OK, | ||
522 | .flags = IORESOURCE_IRQ, | ||
523 | }, | ||
524 | { | ||
525 | .name = "IRQ_LAST", | ||
526 | .start = AB8500_INT_USB_CHARGER_NOT_OKF, | ||
527 | .end = AB8500_INT_USB_CHARGER_NOT_OKF, | ||
528 | .flags = IORESOURCE_IRQ, | ||
529 | }, | ||
530 | }; | ||
531 | |||
532 | static struct resource ab8500_usb_resources[] = { | ||
533 | { | ||
534 | .name = "ID_WAKEUP_R", | ||
535 | .start = AB8500_INT_ID_WAKEUP_R, | ||
536 | .end = AB8500_INT_ID_WAKEUP_R, | ||
537 | .flags = IORESOURCE_IRQ, | ||
538 | }, | ||
539 | { | ||
540 | .name = "ID_WAKEUP_F", | ||
541 | .start = AB8500_INT_ID_WAKEUP_F, | ||
542 | .end = AB8500_INT_ID_WAKEUP_F, | ||
543 | .flags = IORESOURCE_IRQ, | ||
544 | }, | ||
545 | { | ||
546 | .name = "VBUS_DET_F", | ||
547 | .start = AB8500_INT_VBUS_DET_F, | ||
548 | .end = AB8500_INT_VBUS_DET_F, | ||
549 | .flags = IORESOURCE_IRQ, | ||
550 | }, | ||
551 | { | ||
552 | .name = "VBUS_DET_R", | ||
553 | .start = AB8500_INT_VBUS_DET_R, | ||
554 | .end = AB8500_INT_VBUS_DET_R, | ||
555 | .flags = IORESOURCE_IRQ, | ||
556 | }, | ||
557 | }; | ||
558 | |||
559 | static struct resource ab8500_temp_resources[] = { | ||
560 | { | ||
561 | .name = "AB8500_TEMP_WARM", | ||
562 | .start = AB8500_INT_TEMP_WARM, | ||
563 | .end = AB8500_INT_TEMP_WARM, | ||
564 | .flags = IORESOURCE_IRQ, | ||
565 | }, | ||
566 | }; | ||
567 | |||
400 | static struct mfd_cell ab8500_devs[] = { | 568 | static struct mfd_cell ab8500_devs[] = { |
401 | #ifdef CONFIG_DEBUG_FS | 569 | #ifdef CONFIG_DEBUG_FS |
402 | { | 570 | { |
403 | .name = "ab8500-debug", | 571 | .name = "ab8500-debug", |
572 | .num_resources = ARRAY_SIZE(ab8500_debug_resources), | ||
573 | .resources = ab8500_debug_resources, | ||
404 | }, | 574 | }, |
405 | #endif | 575 | #endif |
406 | { | 576 | { |
577 | .name = "ab8500-sysctrl", | ||
578 | }, | ||
579 | { | ||
580 | .name = "ab8500-regulator", | ||
581 | }, | ||
582 | { | ||
407 | .name = "ab8500-gpadc", | 583 | .name = "ab8500-gpadc", |
408 | .num_resources = ARRAY_SIZE(ab8500_gpadc_resources), | 584 | .num_resources = ARRAY_SIZE(ab8500_gpadc_resources), |
409 | .resources = ab8500_gpadc_resources, | 585 | .resources = ab8500_gpadc_resources, |
@@ -414,6 +590,22 @@ static struct mfd_cell ab8500_devs[] = { | |||
414 | .resources = ab8500_rtc_resources, | 590 | .resources = ab8500_rtc_resources, |
415 | }, | 591 | }, |
416 | { | 592 | { |
593 | .name = "ab8500-bm", | ||
594 | .num_resources = ARRAY_SIZE(ab8500_bm_resources), | ||
595 | .resources = ab8500_bm_resources, | ||
596 | }, | ||
597 | { .name = "ab8500-codec", }, | ||
598 | { | ||
599 | .name = "ab8500-usb", | ||
600 | .num_resources = ARRAY_SIZE(ab8500_usb_resources), | ||
601 | .resources = ab8500_usb_resources, | ||
602 | }, | ||
603 | { | ||
604 | .name = "ab8500-poweron-key", | ||
605 | .num_resources = ARRAY_SIZE(ab8500_poweronkey_db_resources), | ||
606 | .resources = ab8500_poweronkey_db_resources, | ||
607 | }, | ||
608 | { | ||
417 | .name = "ab8500-pwm", | 609 | .name = "ab8500-pwm", |
418 | .id = 1, | 610 | .id = 1, |
419 | }, | 611 | }, |
@@ -425,14 +617,14 @@ static struct mfd_cell ab8500_devs[] = { | |||
425 | .name = "ab8500-pwm", | 617 | .name = "ab8500-pwm", |
426 | .id = 3, | 618 | .id = 3, |
427 | }, | 619 | }, |
428 | { .name = "ab8500-charger", }, | 620 | { .name = "ab8500-leds", }, |
429 | { .name = "ab8500-audio", }, | ||
430 | { .name = "ab8500-usb", }, | ||
431 | { .name = "ab8500-regulator", }, | ||
432 | { | 621 | { |
433 | .name = "ab8500-poweron-key", | 622 | .name = "ab8500-denc", |
434 | .num_resources = ARRAY_SIZE(ab8500_poweronkey_db_resources), | 623 | }, |
435 | .resources = ab8500_poweronkey_db_resources, | 624 | { |
625 | .name = "ab8500-temp", | ||
626 | .num_resources = ARRAY_SIZE(ab8500_temp_resources), | ||
627 | .resources = ab8500_temp_resources, | ||
436 | }, | 628 | }, |
437 | }; | 629 | }; |
438 | 630 | ||