Skip to content

Commit 649fee5

Browse files
wensbroonie
authored andcommitted
regulator: mt6358: Sync VCN33_* enable status after checking ID
Syncing VCN33_* enable status should be done after checking the PMIC's ID, to avoid setting random bits on other PMICs. Suggested-by: AngeloGioacchino Del Regno <[email protected]> Fixes: 65bae54 ("regulator: mt6358: Merge VCN33_* regulators") Signed-off-by: Chen-Yu Tsai <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 6eaae19 commit 649fee5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/regulator/mt6358-regulator.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,6 @@ static int mt6358_regulator_probe(struct platform_device *pdev)
676676
const struct mt6358_regulator_info *mt6358_info;
677677
int i, max_regulator, ret;
678678

679-
ret = mt6358_sync_vcn33_setting(&pdev->dev);
680-
if (ret)
681-
return ret;
682-
683679
if (mt6397->chip_id == MT6366_CHIP_ID) {
684680
max_regulator = MT6366_MAX_REGULATOR;
685681
mt6358_info = mt6366_regulators;
@@ -688,6 +684,10 @@ static int mt6358_regulator_probe(struct platform_device *pdev)
688684
mt6358_info = mt6358_regulators;
689685
}
690686

687+
ret = mt6358_sync_vcn33_setting(&pdev->dev);
688+
if (ret)
689+
return ret;
690+
691691
for (i = 0; i < max_regulator; i++) {
692692
config.dev = &pdev->dev;
693693
config.regmap = mt6397->regmap;

0 commit comments

Comments
 (0)