mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Graeme Gregory <gg@slimlogic.co.uk>
To: linux-kernel@vger.kernel.org
Cc: sameo@linux.intel.com, lrg@ti.com,
	broonie@opensource.wolfsonmicro.com, s-guiriec@ti.com,
	Graeme Gregory <gg@slimlogic.co.uk>
Subject: [PATCH 3/3] REGULATOR: fix regmap offsets for enable/disable
Date: Fri, 22 Jun 2012 13:36:20 +0100	[thread overview]
Message-ID: <1340368581-11882-4-git-send-email-gg@slimlogic.co.uk> (raw)
In-Reply-To: <1340368581-11882-1-git-send-email-gg@slimlogic.co.uk>

I forgot to apply the offsets for the regmap helper functions for
enable/disable on SMPS10 and the LDO regulators. This means regulators
will not enable/disable correctly.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Tested-by: Sebastien Guiriec <s-guiriec@ti.com>
---
 drivers/regulator/palmas-regulator.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 6c48511..7540c95 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -667,7 +667,9 @@ static __devinit int palmas_probe(struct platform_device *pdev)
 			pmic->desc[id].ops = &palmas_ops_smps10;
 			pmic->desc[id].vsel_reg = PALMAS_SMPS10_CTRL;
 			pmic->desc[id].vsel_mask = SMPS10_VSEL;
-			pmic->desc[id].enable_reg = PALMAS_SMPS10_STATUS;
+			pmic->desc[id].enable_reg =
+					PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE,
+							PALMAS_SMPS10_STATUS);
 			pmic->desc[id].enable_mask = SMPS10_BOOST_EN;
 			pmic->desc[id].min_uV = 3750000;
 			pmic->desc[id].uV_step = 1250000;
@@ -739,7 +741,8 @@ static __devinit int palmas_probe(struct platform_device *pdev)
 
 		pmic->desc[id].type = REGULATOR_VOLTAGE;
 		pmic->desc[id].owner = THIS_MODULE;
-		pmic->desc[id].enable_reg = palmas_regs_info[id].ctrl_addr;
+		pmic->desc[id].enable_reg = PALMAS_BASE_TO_REG(PALMAS_LDO_BASE,
+						palmas_regs_info[id].ctrl_addr);
 		pmic->desc[id].enable_mask = PALMAS_LDO1_CTRL_MODE_ACTIVE;
 
 		if (pdata && pdata->reg_data)
-- 
1.7.9.5


  parent reply	other threads:[~2012-06-22 12:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 12:36 [PATCH 0/1] Palmas Bugfixes Graeme Gregory
2012-06-22 12:36 ` [PATCH 1/3] MFD: palmas fix regulator pdata missing Graeme Gregory
2012-07-05 14:48   ` Samuel Ortiz
2012-06-22 12:36 ` [PATCH 2/3] MFD: add missing hunk to change irq to clear on read Graeme Gregory
2012-07-05 14:49   ` Samuel Ortiz
2012-06-22 12:36 ` Graeme Gregory [this message]
2012-06-23 10:38   ` [PATCH 3/3] REGULATOR: fix regmap offsets for enable/disable 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=1340368581-11882-4-git-send-email-gg@slimlogic.co.uk \
    --to=gg@slimlogic.co.uk \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=s-guiriec@ti.com \
    --cc=sameo@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®