All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>,
	Liam Girdwood <lrg@ti.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	"Jett.Zhou" <jtzhou@marvell.com>
Subject: [PATCH] regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_sel
Date: Thu, 19 Apr 2012 11:15:58 +0800	[thread overview]
Message-ID: <1334805358.22839.2.camel@phoenix> (raw)

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




             reply	other threads:[~2012-04-19  3:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19  3:15 Axel Lin [this message]
2012-04-19 12:45 ` [PATCH] regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_sel Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334805358.22839.2.camel@phoenix \
    --to=axel.lin@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=haojian.zhuang@marvell.com \
    --cc=jtzhou@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.