Skip to contentSkip to conversation

regulator: Fix mask parameter in da9052_reg_update calls

PATCH Applied Axel Lin 2 participants 2 messages Mar 2, 2012 – Mar 5, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: Fix mask parameter in da9052_reg_update calls

If the mask parameter is 0, info->activate_bit bit won't be set by calling da9052_reg_update.

---
Hi,
I cannot find the datasheet, but current code looks does not make sense. Can someone confirm if this is a correct fix?

Regards,
Axel

 drivers/regulator/da9052-regulator.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/regulator/da9052-regulator.c +4 -4
index 3767364..ea4d8f5 100644
@@ -260,8 +260,8 @@ static int da9052_set_ldo5_6_voltage(struct regulator_dev *rdev,
 	 * the LDO activate bit to implment the changes on the
 	 * LDO output.
 	*/
-	return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, 0,
-				 info->activate_bit);
+	return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG,
+				 info->activate_bit, info->activate_bit);
 }
 
 static int da9052_set_dcdc_voltage(struct regulator_dev *rdev,
@@ -280,8 +280,8 @@ static int da9052_set_dcdc_voltage(struct regulator_dev *rdev,
 	 * the DCDC activate bit to implment the changes on the
 	 * DCDC output.
 	*/
-	return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, 0,
-				 info->activate_bit);
+	return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG,
+				 info->activate_bit, info->activate_bit);
 }
 
 static int da9052_get_regulator_voltage_sel(struct regulator_dev *rdev)
Signature · 1 line
1.7.5.4
Applied
#1 lore raw
Quoted 2 lines · Axel Lin

If the mask parameter is 0, info->activate_bit bit won't be set by calling da9052_reg_update.

Applied, thanks.