diff --git a/patches.suse/regulator-mt6359-add-read-check-for-PMIC-MT6359.patch b/patches.suse/regulator-mt6359-add-read-check-for-PMIC-MT6359.patch new file mode 100644 index 0000000..b82ae28 --- /dev/null +++ b/patches.suse/regulator-mt6359-add-read-check-for-PMIC-MT6359.patch @@ -0,0 +1,43 @@ +From a511637502b1caa135046d0f8fdabd55a31af8ef Mon Sep 17 00:00:00 2001 +From: Sen Chu +Date: Thu, 18 May 2023 12:06:46 +0800 +Subject: [PATCH] regulator: mt6359: add read check for PMIC MT6359 +Git-commit: a511637502b1caa135046d0f8fdabd55a31af8ef +Patch-mainline: v6.4-rc4 +References: git-fixes + +Add hardware version read check for PMIC MT6359 + +Signed-off-by: Sen Chu + +--- + drivers/regulator/mt6359-regulator.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/drivers/regulator/mt6359-regulator.c b/drivers/regulator/mt6359-regulator.c +index 1849566784ab..3eb86ec21d08 100644 +--- a/drivers/regulator/mt6359-regulator.c ++++ b/drivers/regulator/mt6359-regulator.c +@@ -951,9 +951,12 @@ static int mt6359_regulator_probe(struct platform_device *pdev) + struct regulator_config config = {}; + struct regulator_dev *rdev; + 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) + mt6359_info = mt6359p_regulators; + else +-- +2.35.3 + diff --git a/series.conf b/series.conf index 87a899a..af49588 100644 --- a/series.conf +++ b/series.conf @@ -20175,6 +20175,7 @@ patches.suse/powerpc-iommu-DMA-address-offset-is-incorrectly-calc.patch patches.suse/mmc-sdhci-esdhc-imx-make-no-mmc-hs400-works.patch patches.suse/regulator-pca9450-Fix-BUCK2-enable_mask.patch + patches.suse/regulator-mt6359-add-read-check-for-PMIC-MT6359.patch ######################################################## # end of sorted patches