return err;
}
- /* register external regulators (before Vaux1, 2 and 3) */
- err = ab8500_ext_regulator_init(pdev);
- if (err)
- return err;
+ if (!is_ab8505(ab8500)) {
+ /* register external regulators (before Vaux1, 2 and 3) */
+ err = ab8500_ext_regulator_init(pdev);
+ if (err)
+ return err;
+ }
/* register all regulators */
for (i = 0; i < regulator_info_size; i++) {
regulator_unregister(info->regulator);
}
- /* remove external regulators (after Vaux1, 2 and 3) */
- err = ab8500_ext_regulator_exit(pdev);
- if (err)
- return err;
+ if (!is_ab8505(ab8500)) {
+ /* remove external regulators (after Vaux1, 2 and 3) */
+ err = ab8500_ext_regulator_exit(pdev);
+ if (err)
+ return err;
+ }
/* remove regulator debug */
err = ab8500_regulator_debug_exit(pdev);