regulator: ab8500: Also check for AB8505 based platforms
authorLee Jones <lee.jones@linaro.org>
Tue, 2 Apr 2013 12:24:10 +0000 (13:24 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 2 Apr 2013 22:01:43 +0000 (23:01 +0100)
Ensure we initialise AB8505 external supply regulators.

Signed-off-by: Alexandre Torgue <alexandre.torgue@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Tested-by: Xiao Mei ZHANG <xiaomei.zhang@stericsson.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/ab8500-ext.c
drivers/regulator/ab8500.c

index 1e92e0103380a80da69548e48654caafdc9d51b7..c24372e969225bc0988751321006993b28c9af21 100644 (file)
@@ -393,7 +393,7 @@ int ab8500_ext_regulator_init(struct platform_device *pdev)
                config.init_data = &pdata->ext_regulator[i];
                config.driver_data = info;
 
-               if (is_ab9540(ab8500) &&
+               if ((is_ab9540(ab8500) || is_ab8540(ab8500)) &&
                    ((info->desc.id == AB8500_EXT_SUPPLY1) ||
                     (info->desc.id == AB8500_EXT_SUPPLY2) ||
                     (info->desc.id == AB8500_EXT_SUPPLY3)))
index bf9139784670cfe240048e5101fe93545d253081..e8d07f667448cc184d934ccd0c34e5cc6e2a4646 100644 (file)
@@ -2852,6 +2852,9 @@ static int ab8500_regulator_remove(struct platform_device *pdev)
        } else if (is_ab8505(ab8500)) {
                regulator_info = ab8505_regulator_info;
                regulator_info_size = ARRAY_SIZE(ab8505_regulator_info);
+       } else if (is_ab8540(ab8500)) {
+               regulator_info = ab8540_regulator_info;
+               regulator_info_size = ARRAY_SIZE(ab8540_regulator_info);
        } else {
                regulator_info = ab8500_regulator_info;
                regulator_info_size = ARRAY_SIZE(ab8500_regulator_info);