Skip to content

Commit f767b33

Browse files
committed
Merge tag 'regulator-fix-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator fixes from Mark Brown: "Some fixes that came in since the merge window, nothing terribly exciting - a couple of driver specific fixes and a fix for the error handling when setting up the debugfs for the devices" * tag 'regulator-fix-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: mt6359: add read check for PMIC MT6359 regulator: Fix error checking for debugfs_create_dir regulator: pca9450: Fix BUCK2 enable_mask
2 parents 203fc31 + a511637 commit f767b33

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

drivers/regulator/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5256,7 +5256,7 @@ static void rdev_init_debugfs(struct regulator_dev *rdev)
52565256
}
52575257

52585258
rdev->debugfs = debugfs_create_dir(rname, debugfs_root);
5259-
if (!rdev->debugfs) {
5259+
if (IS_ERR(rdev->debugfs)) {
52605260
rdev_warn(rdev, "Failed to create debugfs directory\n");
52615261
return;
52625262
}
@@ -6178,7 +6178,7 @@ static int __init regulator_init(void)
61786178
ret = class_register(&regulator_class);
61796179

61806180
debugfs_root = debugfs_create_dir("regulator", NULL);
6181-
if (!debugfs_root)
6181+
if (IS_ERR(debugfs_root))
61826182
pr_warn("regulator: Failed to create debugfs directory\n");
61836183

61846184
#ifdef CONFIG_DEBUG_FS

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

drivers/regulator/pca9450-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ static const struct pca9450_regulator_desc pca9450a_regulators[] = {
264264
.vsel_reg = PCA9450_REG_BUCK2OUT_DVS0,
265265
.vsel_mask = BUCK2OUT_DVS0_MASK,
266266
.enable_reg = PCA9450_REG_BUCK2CTRL,
267-
.enable_mask = BUCK1_ENMODE_MASK,
267+
.enable_mask = BUCK2_ENMODE_MASK,
268268
.ramp_reg = PCA9450_REG_BUCK2CTRL,
269269
.ramp_mask = BUCK2_RAMP_MASK,
270270
.ramp_delay_table = pca9450_dvs_buck_ramp_table,
@@ -502,7 +502,7 @@ static const struct pca9450_regulator_desc pca9450bc_regulators[] = {
502502
.vsel_reg = PCA9450_REG_BUCK2OUT_DVS0,
503503
.vsel_mask = BUCK2OUT_DVS0_MASK,
504504
.enable_reg = PCA9450_REG_BUCK2CTRL,
505-
.enable_mask = BUCK1_ENMODE_MASK,
505+
.enable_mask = BUCK2_ENMODE_MASK,
506506
.ramp_reg = PCA9450_REG_BUCK2CTRL,
507507
.ramp_mask = BUCK2_RAMP_MASK,
508508
.ramp_delay_table = pca9450_dvs_buck_ramp_table,

0 commit comments

Comments
 (0)