public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC/RFT] regulator: Fix mask parameter in da9052_reg_update calls
@ 2012-03-02 10:07 Axel Lin
  2012-03-05 12:31 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-03-02 10:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Dajun Chen, Ashish Jangam, Ying-Chun Liu (PaulLiu),
	Mark Brown, Liam Girdwood

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

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
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(-)

diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index 3767364..ea4d8f5 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -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)
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-05 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-02 10:07 [PATCH RFC/RFT] regulator: Fix mask parameter in da9052_reg_update calls Axel Lin
2012-03-05 12:31 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox