diff options
Diffstat (limited to 'drivers/mfd/ab8500-core.c')
-rw-r--r-- | drivers/mfd/ab8500-core.c | 64 |
1 files changed, 39 insertions, 25 deletions
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index e580c5d535fb..626b4ecaf647 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c | |||
@@ -970,54 +970,69 @@ static struct mfd_cell __devinitdata abx500_common_devs[] = { | |||
970 | #ifdef CONFIG_DEBUG_FS | 970 | #ifdef CONFIG_DEBUG_FS |
971 | { | 971 | { |
972 | .name = "ab8500-debug", | 972 | .name = "ab8500-debug", |
973 | .of_compatible = "stericsson,ab8500-debug", | ||
973 | .num_resources = ARRAY_SIZE(ab8500_debug_resources), | 974 | .num_resources = ARRAY_SIZE(ab8500_debug_resources), |
974 | .resources = ab8500_debug_resources, | 975 | .resources = ab8500_debug_resources, |
975 | }, | 976 | }, |
976 | #endif | 977 | #endif |
977 | { | 978 | { |
978 | .name = "ab8500-sysctrl", | 979 | .name = "ab8500-sysctrl", |
980 | .of_compatible = "stericsson,ab8500-sysctrl", | ||
979 | }, | 981 | }, |
980 | { | 982 | { |
981 | .name = "ab8500-regulator", | 983 | .name = "ab8500-regulator", |
984 | .of_compatible = "stericsson,ab8500-regulator", | ||
982 | }, | 985 | }, |
983 | { | 986 | { |
984 | .name = "ab8500-gpadc", | 987 | .name = "ab8500-gpadc", |
988 | .of_compatible = "stericsson,ab8500-gpadc", | ||
985 | .num_resources = ARRAY_SIZE(ab8500_gpadc_resources), | 989 | .num_resources = ARRAY_SIZE(ab8500_gpadc_resources), |
986 | .resources = ab8500_gpadc_resources, | 990 | .resources = ab8500_gpadc_resources, |
987 | }, | 991 | }, |
988 | { | 992 | { |
989 | .name = "ab8500-rtc", | 993 | .name = "ab8500-rtc", |
994 | .of_compatible = "stericsson,ab8500-rtc", | ||
990 | .num_resources = ARRAY_SIZE(ab8500_rtc_resources), | 995 | .num_resources = ARRAY_SIZE(ab8500_rtc_resources), |
991 | .resources = ab8500_rtc_resources, | 996 | .resources = ab8500_rtc_resources, |
992 | }, | 997 | }, |
993 | { | 998 | { |
994 | .name = "ab8500-acc-det", | 999 | .name = "ab8500-acc-det", |
1000 | .of_compatible = "stericsson,ab8500-acc-det", | ||
995 | .num_resources = ARRAY_SIZE(ab8500_av_acc_detect_resources), | 1001 | .num_resources = ARRAY_SIZE(ab8500_av_acc_detect_resources), |
996 | .resources = ab8500_av_acc_detect_resources, | 1002 | .resources = ab8500_av_acc_detect_resources, |
997 | }, | 1003 | }, |
998 | { | 1004 | { |
999 | .name = "ab8500-poweron-key", | 1005 | .name = "ab8500-poweron-key", |
1006 | .of_compatible = "stericsson,ab8500-poweron-key", | ||
1000 | .num_resources = ARRAY_SIZE(ab8500_poweronkey_db_resources), | 1007 | .num_resources = ARRAY_SIZE(ab8500_poweronkey_db_resources), |
1001 | .resources = ab8500_poweronkey_db_resources, | 1008 | .resources = ab8500_poweronkey_db_resources, |
1002 | }, | 1009 | }, |
1003 | { | 1010 | { |
1004 | .name = "ab8500-pwm", | 1011 | .name = "ab8500-pwm", |
1012 | .of_compatible = "stericsson,ab8500-pwm", | ||
1005 | .id = 1, | 1013 | .id = 1, |
1006 | }, | 1014 | }, |
1007 | { | 1015 | { |
1008 | .name = "ab8500-pwm", | 1016 | .name = "ab8500-pwm", |
1017 | .of_compatible = "stericsson,ab8500-pwm", | ||
1009 | .id = 2, | 1018 | .id = 2, |
1010 | }, | 1019 | }, |
1011 | { | 1020 | { |
1012 | .name = "ab8500-pwm", | 1021 | .name = "ab8500-pwm", |
1022 | .of_compatible = "stericsson,ab8500-pwm", | ||
1013 | .id = 3, | 1023 | .id = 3, |
1014 | }, | 1024 | }, |
1015 | { .name = "ab8500-leds", }, | 1025 | { |
1026 | .name = "ab8500-leds", | ||
1027 | .of_compatible = "stericsson,ab8500-leds", | ||
1028 | }, | ||
1016 | { | 1029 | { |
1017 | .name = "ab8500-denc", | 1030 | .name = "ab8500-denc", |
1031 | .of_compatible = "stericsson,ab8500-denc", | ||
1018 | }, | 1032 | }, |
1019 | { | 1033 | { |
1020 | .name = "ab8500-temp", | 1034 | .name = "ab8500-temp", |
1035 | .of_compatible = "stericsson,ab8500-temp", | ||
1021 | .num_resources = ARRAY_SIZE(ab8500_temp_resources), | 1036 | .num_resources = ARRAY_SIZE(ab8500_temp_resources), |
1022 | .resources = ab8500_temp_resources, | 1037 | .resources = ab8500_temp_resources, |
1023 | }, | 1038 | }, |
@@ -1049,11 +1064,13 @@ static struct mfd_cell __devinitdata ab8500_bm_devs[] = { | |||
1049 | static struct mfd_cell __devinitdata ab8500_devs[] = { | 1064 | static struct mfd_cell __devinitdata ab8500_devs[] = { |
1050 | { | 1065 | { |
1051 | .name = "ab8500-gpio", | 1066 | .name = "ab8500-gpio", |
1067 | .of_compatible = "stericsson,ab8500-gpio", | ||
1052 | .num_resources = ARRAY_SIZE(ab8500_gpio_resources), | 1068 | .num_resources = ARRAY_SIZE(ab8500_gpio_resources), |
1053 | .resources = ab8500_gpio_resources, | 1069 | .resources = ab8500_gpio_resources, |
1054 | }, | 1070 | }, |
1055 | { | 1071 | { |
1056 | .name = "ab8500-usb", | 1072 | .name = "ab8500-usb", |
1073 | .of_compatible = "stericsson,ab8500-usb", | ||
1057 | .num_resources = ARRAY_SIZE(ab8500_usb_resources), | 1074 | .num_resources = ARRAY_SIZE(ab8500_usb_resources), |
1058 | .resources = ab8500_usb_resources, | 1075 | .resources = ab8500_usb_resources, |
1059 | }, | 1076 | }, |
@@ -1399,32 +1416,29 @@ static int __devinit ab8500_probe(struct platform_device *pdev) | |||
1399 | goto out_freeoldmask; | 1416 | goto out_freeoldmask; |
1400 | } | 1417 | } |
1401 | 1418 | ||
1402 | if (!np) { | 1419 | ret = mfd_add_devices(ab8500->dev, 0, abx500_common_devs, |
1403 | ret = mfd_add_devices(ab8500->dev, 0, abx500_common_devs, | 1420 | ARRAY_SIZE(abx500_common_devs), NULL, |
1404 | ARRAY_SIZE(abx500_common_devs), NULL, | 1421 | ab8500->irq_base); |
1405 | ab8500->irq_base); | 1422 | if (ret) |
1423 | goto out_freeirq; | ||
1406 | 1424 | ||
1407 | if (ret) | 1425 | if (is_ab9540(ab8500)) |
1408 | goto out_freeirq; | 1426 | ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs, |
1409 | 1427 | ARRAY_SIZE(ab9540_devs), NULL, | |
1410 | if (is_ab9540(ab8500)) | 1428 | ab8500->irq_base); |
1411 | ret = mfd_add_devices(ab8500->dev, 0, ab9540_devs, | 1429 | else |
1412 | ARRAY_SIZE(ab9540_devs), NULL, | 1430 | ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs, |
1413 | ab8500->irq_base); | 1431 | ARRAY_SIZE(ab8500_devs), NULL, |
1414 | else | 1432 | ab8500->irq_base); |
1415 | ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs, | 1433 | if (ret) |
1416 | ARRAY_SIZE(ab8500_devs), NULL, | 1434 | goto out_freeirq; |
1417 | ab8500->irq_base); | ||
1418 | if (ret) | ||
1419 | goto out_freeirq; | ||
1420 | 1435 | ||
1421 | if (is_ab9540(ab8500) || is_ab8505(ab8500)) | 1436 | if (is_ab9540(ab8500) || is_ab8505(ab8500)) |
1422 | ret = mfd_add_devices(ab8500->dev, 0, ab9540_ab8505_devs, | 1437 | ret = mfd_add_devices(ab8500->dev, 0, ab9540_ab8505_devs, |
1423 | ARRAY_SIZE(ab9540_ab8505_devs), NULL, | 1438 | ARRAY_SIZE(ab9540_ab8505_devs), NULL, |
1424 | ab8500->irq_base); | 1439 | ab8500->irq_base); |
1425 | if (ret) | 1440 | if (ret) |
1426 | goto out_freeirq; | 1441 | goto out_freeirq; |
1427 | } | ||
1428 | 1442 | ||
1429 | if (!no_bm) { | 1443 | if (!no_bm) { |
1430 | /* Add battery management devices */ | 1444 | /* Add battery management devices */ |