linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_sel
@ 2012-04-19  3:15 Axel Lin
  2012-04-19 12:45 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-04-19  3:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Haojian Zhuang, Liam Girdwood, Mark Brown, Jett.Zhou

commit 4ca1e1d "regulator: Convert 88pm8607 to set_voltage_sel" accidentally
changed the value writing to vol_reg.
What we want is to write val instead of selector to vol_reg.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
This only impact is setting LDO13, for other LDOs/BUCKs the shift is 0.

 drivers/regulator/88pm8607.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index d04fbe9..06d9c4b 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -232,7 +232,7 @@ static int pm8607_set_voltage_sel(struct regulator_dev *rdev, unsigned selector)
 	val = (uint8_t)(selector << info->vol_shift);
 	mask = (rdev->desc->n_voltages - 1)  << info->vol_shift;
 
-	ret = pm860x_set_bits(info->i2c, info->vol_reg, mask, selector);
+	ret = pm860x_set_bits(info->i2c, info->vol_reg, mask, val);
 	if (ret)
 		return ret;
 	switch (info->desc.id) {
-- 
1.7.5.4




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

* Re: [PATCH] regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_sel
  2012-04-19  3:15 [PATCH] regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_sel Axel Lin
@ 2012-04-19 12:45 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-04-19 12:45 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Haojian Zhuang, Liam Girdwood, Jett.Zhou

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

On Thu, Apr 19, 2012 at 11:15:58AM +0800, Axel Lin wrote:
> commit 4ca1e1d "regulator: Convert 88pm8607 to set_voltage_sel" accidentally
> changed the value writing to vol_reg.
> What we want is to write val instead of selector to vol_reg.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-04-19 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-19  3:15 [PATCH] regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_sel Axel Lin
2012-04-19 12:45 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).