mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
regulator: mt6359: add read check for PMIC MT6359
Add hardware version read check for PMIC MT6359
Signed-off-by: Sen Chu <sen.chu@mediatek.com
Fixes: 4cfc965475
("regulator: mt6359: Add support for MT6359P regulator")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com
Link: https://lore.kernel.org/r/20230518040646.8730-1-sen.chu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org
This commit is contained in:
parent
2bf1c45be3
commit
a511637502
1 changed files with 5 additions and 2 deletions
|
@ -951,9 +951,12 @@ static int mt6359_regulator_probe(struct platform_device *pdev)
|
||||||
struct regulator_config config = {};
|
struct regulator_config config = {};
|
||||||
struct regulator_dev *rdev;
|
struct regulator_dev *rdev;
|
||||||
struct mt6359_regulator_info *mt6359_info;
|
struct mt6359_regulator_info *mt6359_info;
|
||||||
int i, hw_ver;
|
int i, hw_ver, ret;
|
||||||
|
|
||||||
|
ret = regmap_read(mt6397->regmap, MT6359P_HWCID, &hw_ver);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
regmap_read(mt6397->regmap, MT6359P_HWCID, &hw_ver);
|
|
||||||
if (hw_ver >= MT6359P_CHIP_VER)
|
if (hw_ver >= MT6359P_CHIP_VER)
|
||||||
mt6359_info = mt6359p_regulators;
|
mt6359_info = mt6359p_regulators;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue