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 <angelogioacchino.delregno@collabora.com>
Fixes: 65bae54e08c1 ("regulator: mt6358: Merge VCN33_* regulators")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230721082903.2038975-3-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by Chen-Yu Tsai and committed by Mark Brown 649fee5a 6eaae198

+4 -4
+4 -4
drivers/regulator/mt6358-regulator.c
··· 676 const struct mt6358_regulator_info *mt6358_info; 677 int i, max_regulator, ret; 678 679 - ret = mt6358_sync_vcn33_setting(&pdev->dev); 680 - if (ret) 681 - return ret; 682 - 683 if (mt6397->chip_id == MT6366_CHIP_ID) { 684 max_regulator = MT6366_MAX_REGULATOR; 685 mt6358_info = mt6366_regulators; ··· 683 max_regulator = MT6358_MAX_REGULATOR; 684 mt6358_info = mt6358_regulators; 685 } 686 687 for (i = 0; i < max_regulator; i++) { 688 config.dev = &pdev->dev;
··· 676 const struct mt6358_regulator_info *mt6358_info; 677 int i, max_regulator, ret; 678 679 if (mt6397->chip_id == MT6366_CHIP_ID) { 680 max_regulator = MT6366_MAX_REGULATOR; 681 mt6358_info = mt6366_regulators; ··· 687 max_regulator = MT6358_MAX_REGULATOR; 688 mt6358_info = mt6358_regulators; 689 } 690 + 691 + ret = mt6358_sync_vcn33_setting(&pdev->dev); 692 + if (ret) 693 + return ret; 694 695 for (i = 0; i < max_regulator; i++) { 696 config.dev = &pdev->dev;