Skip to content

Commit 85c4502

Browse files
Sen Chugregkh
Sen Chu
authored andcommitted
regulator: mt6359: add read check for PMIC MT6359
commit a511637 upstream. Add hardware version read check for PMIC MT6359 Signed-off-by: Sen Chu <[email protected] Fixes: 4cfc965 ("regulator: mt6359: Add support for MT6359P regulator") Reviewed-by: AngeloGioacchino Del Regno <[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b77ec23 commit 85c4502

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/regulator/mt6359-regulator.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,9 +951,12 @@ static int mt6359_regulator_probe(struct platform_device *pdev)
951951
struct regulator_config config = {};
952952
struct regulator_dev *rdev;
953953
struct mt6359_regulator_info *mt6359_info;
954-
int i, hw_ver;
954+
int i, hw_ver, ret;
955+
956+
ret = regmap_read(mt6397->regmap, MT6359P_HWCID, &hw_ver);
957+
if (ret)
958+
return ret;
955959

956-
regmap_read(mt6397->regmap, MT6359P_HWCID, &hw_ver);
957960
if (hw_ver >= MT6359P_CHIP_VER)
958961
mt6359_info = mt6359p_regulators;
959962
else

0 commit comments

Comments
 (0)