mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keerthy <j-keerthy@ti.com>
To: <broonie@kernel.org>, <sameo@linux.intel.com>, <lee.jones@linaro.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org>,
	<j-keerthy@ti.com>
Subject: [PATCH 1/2] regulator: palmas: Correct TPS659038 register definition for REGEN2
Date: Tue, 17 Mar 2015 15:56:04 +0530	[thread overview]
Message-ID: <1426587965-23553-2-git-send-email-j-keerthy@ti.com> (raw)
In-Reply-To: <1426587965-23553-1-git-send-email-j-keerthy@ti.com>

The register offset for REGEN2_CTRL in different for TPS659038 chip as when
compared with other Palmas family PMICs. In the case of TPS659038 the wrong
offset pointed to PLLEN_CTRL and was causing a hang. Correcting the same.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
Tested for the regulator enumerations on DRA7 and BEAGLE-X15 boards.
No Hang observed.

 drivers/regulator/palmas-regulator.c | 4 ++++
 include/linux/mfd/palmas.h           | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 9205f43..1819831 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -1572,6 +1572,10 @@ static int palmas_regulators_probe(struct platform_device *pdev)
 	if (!pmic)
 		return -ENOMEM;
 
+	if (of_device_is_compatible(node, "ti,tps659038-pmic"))
+		palmas_generic_regs_info[PALMAS_REG_REGEN2].ctrl_addr =
+							TPS659038_REGEN2_CTRL;
+
 	pmic->dev = &pdev->dev;
 	pmic->palmas = palmas;
 	palmas->pmic = pmic;
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index fb0390a..ee7b1ce 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -2999,6 +2999,9 @@ enum usb_irq_events {
 #define PALMAS_GPADC_TRIM15					0x0E
 #define PALMAS_GPADC_TRIM16					0x0F
 
+/* TPS659038 regen2_ctrl offset iss different from palmas */
+#define TPS659038_REGEN2_CTRL					0x12
+
 /* TPS65917 Interrupt registers */
 
 /* Registers for function INTERRUPT */
-- 
1.9.1


  reply	other threads:[~2015-03-17 10:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 10:26 [PATCH 0/2] regulator: TPS659038: Fixes for REGEN2 and REGEN3 Keerthy
2015-03-17 10:26 ` Keerthy [this message]
2015-03-17 10:26 ` [PATCH 2/2] regulator: Palmas: Add has_regen3 check for TPS659038 Keerthy
2015-03-17 12:21 ` [PATCH 0/2] regulator: TPS659038: Fixes for REGEN2 and REGEN3 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=1426587965-23553-2-git-send-email-j-keerthy@ti.com \
    --to=j-keerthy@ti.com \
    --cc=broonie@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --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®