Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7eae37f authored by Rabin Vincent's avatar Rabin Vincent Committed by Mark Brown
Browse files

regulator: ab8500: Don't register external regulators on AB8505



ExtSupply regulators are not included on AB8505 based platforms.

Signed-off-by: default avatarRabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Tested-by: default avatarMarcus COOPER <marcus.xm.cooper@stericsson.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 0b946411
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -2777,10 +2777,12 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
			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++) {
@@ -2822,10 +2824,12 @@ static int ab8500_regulator_remove(struct platform_device *pdev)
		regulator_unregister(info->regulator);
	}

	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);