regulator: ab8500-ext: Add support for AB9540 regulators
authorLee Jones <lee.jones@linaro.org>
Tue, 2 Apr 2013 12:24:06 +0000 (13:24 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 2 Apr 2013 22:01:41 +0000 (23:01 +0100)
Add the support for ab9540 external regulators.

Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/ab8500-ext.c

index debae34b9dd49813b237092073c73e45c75d3420..1e92e0103380a80da69548e48654caafdc9d51b7 100644 (file)
@@ -393,6 +393,12 @@ int ab8500_ext_regulator_init(struct platform_device *pdev)
                config.init_data = &pdata->ext_regulator[i];
                config.driver_data = info;
 
+               if (is_ab9540(ab8500) &&
+                   ((info->desc.id == AB8500_EXT_SUPPLY1) ||
+                    (info->desc.id == AB8500_EXT_SUPPLY2) ||
+                    (info->desc.id == AB8500_EXT_SUPPLY3)))
+                       info->desc.ops = &ab8500_ext_regulator_ops;
+
                /* register regulator with framework */
                info->rdev = regulator_register(&info->desc, &config);