From: J Keerthy <j-keerthy@ti.com>
To: linux-omap@vger.kernel.org
Cc: broonie@kernel.org, j-keerthy@ti.com, ldewangan@nvidia.com,
sameo@linux.intel.com, grant.likely@secretlab.ca,
swarren@nvidia.com, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, gg@slimlogic.co.uk
Subject: [PATCH 3/4] MFD: Palmas: Add SMPS10_BOOST feature
Date: Mon, 17 Jun 2013 17:39:13 +0530 [thread overview]
Message-ID: <1371470954-9124-4-git-send-email-j-keerthy@ti.com> (raw)
In-Reply-To: <1371470954-9124-1-git-send-email-j-keerthy@ti.com>
The SMPS10 regulator is not presesnt in all the variants
of the PALMAS PMIC family. Hence adding a feature to distingush
between them.
Signed-off-by: J Keerthy <j-keerthy@ti.com>
---
drivers/mfd/palmas.c | 3 ++-
drivers/regulator/palmas-regulator.c | 3 +++
include/linux/mfd/palmas.h | 4 ++++
3 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 261beb5..ad00c18 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -231,7 +231,8 @@ static void palmas_dt_to_pdata(struct i2c_client *i2c,
palmas_set_pdata_irq_flag(i2c, pdata);
}
-static unsigned int palmas_features = PALMAS_PMIC_FEATURE_INTERRUPT;
+static unsigned int palmas_features = PALMAS_PMIC_FEATURE_INTERRUPT |
+ PALMAS_PMIC_FEATURE_SMPS10_BOOST;
static unsigned int tps659038_features;
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 3ae44ac..1ae1e83 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -838,6 +838,9 @@ static int palmas_regulators_probe(struct platform_device *pdev)
continue;
ramp_delay_support = true;
break;
+ case PALMAS_REG_SMPS10:
+ if (!PALMAS_PMIC_HAS(palmas, SMPS10_BOOST))
+ continue;
}
if ((id == PALMAS_REG_SMPS6) || (id == PALMAS_REG_SMPS8))
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 1b5b5f3..2a9f4d6 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -38,10 +38,14 @@
* PALMAS_PMIC_FEATURE_INTERRUPT - used when the PMIC has Interrupt line going
* to an application processor.
*
+ * PALMAS_PMIC_FEATURE_SMPS10_BOOST - used when the PMIC provides SMPS10 boost
+ * voltage supply.
+ *
* PALMAS_PMIC_HAS(b, f) - macro to check if a bandgap device is capable of a
* specific feature (above) or not. Return non-zero, if yes.
*/
#define PALMAS_PMIC_FEATURE_INTERRUPT BIT(0)
+#define PALMAS_PMIC_FEATURE_SMPS10_BOOST BIT(1)
#define PALMAS_PMIC_HAS(b, f) \
((b)->features & PALMAS_PMIC_FEATURE_ ## f)
--
1.7.5.4
WARNING: multiple messages have this Message-ID (diff)
From: J Keerthy <j-keerthy@ti.com>
To: <linux-omap@vger.kernel.org>
Cc: <broonie@kernel.org>, <j-keerthy@ti.com>, <ldewangan@nvidia.com>,
<sameo@linux.intel.com>, <grant.likely@secretlab.ca>,
<swarren@nvidia.com>, <linux-kernel@vger.kernel.org>,
<linux-doc@vger.kernel.org>, <gg@slimlogic.co.uk>
Subject: [PATCH 3/4] MFD: Palmas: Add SMPS10_BOOST feature
Date: Mon, 17 Jun 2013 17:39:13 +0530 [thread overview]
Message-ID: <1371470954-9124-4-git-send-email-j-keerthy@ti.com> (raw)
In-Reply-To: <1371470954-9124-1-git-send-email-j-keerthy@ti.com>
The SMPS10 regulator is not presesnt in all the variants
of the PALMAS PMIC family. Hence adding a feature to distingush
between them.
Signed-off-by: J Keerthy <j-keerthy@ti.com>
---
drivers/mfd/palmas.c | 3 ++-
drivers/regulator/palmas-regulator.c | 3 +++
include/linux/mfd/palmas.h | 4 ++++
3 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 261beb5..ad00c18 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -231,7 +231,8 @@ static void palmas_dt_to_pdata(struct i2c_client *i2c,
palmas_set_pdata_irq_flag(i2c, pdata);
}
-static unsigned int palmas_features = PALMAS_PMIC_FEATURE_INTERRUPT;
+static unsigned int palmas_features = PALMAS_PMIC_FEATURE_INTERRUPT |
+ PALMAS_PMIC_FEATURE_SMPS10_BOOST;
static unsigned int tps659038_features;
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 3ae44ac..1ae1e83 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -838,6 +838,9 @@ static int palmas_regulators_probe(struct platform_device *pdev)
continue;
ramp_delay_support = true;
break;
+ case PALMAS_REG_SMPS10:
+ if (!PALMAS_PMIC_HAS(palmas, SMPS10_BOOST))
+ continue;
}
if ((id == PALMAS_REG_SMPS6) || (id == PALMAS_REG_SMPS8))
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 1b5b5f3..2a9f4d6 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -38,10 +38,14 @@
* PALMAS_PMIC_FEATURE_INTERRUPT - used when the PMIC has Interrupt line going
* to an application processor.
*
+ * PALMAS_PMIC_FEATURE_SMPS10_BOOST - used when the PMIC provides SMPS10 boost
+ * voltage supply.
+ *
* PALMAS_PMIC_HAS(b, f) - macro to check if a bandgap device is capable of a
* specific feature (above) or not. Return non-zero, if yes.
*/
#define PALMAS_PMIC_FEATURE_INTERRUPT BIT(0)
+#define PALMAS_PMIC_FEATURE_SMPS10_BOOST BIT(1)
#define PALMAS_PMIC_HAS(b, f) \
((b)->features & PALMAS_PMIC_FEATURE_ ## f)
--
1.7.5.4
next prev parent reply other threads:[~2013-06-17 12:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-17 12:09 [PATCH 0/4] MFD: Palmas: Add TPS659038 PMIC to supported devices of Palmas J Keerthy
2013-06-17 12:09 ` J Keerthy
2013-06-17 12:09 ` [PATCH 1/4] MFD: Palmas: Add Interrupt feature J Keerthy
2013-06-17 12:09 ` J Keerthy
2013-06-17 16:16 ` Mark Brown
2013-06-18 5:15 ` J, KEERTHY
2013-06-18 8:58 ` Mark Brown
2013-06-18 9:01 ` J, KEERTHY
2013-06-17 12:09 ` [PATCH 2/4] mfd: Palmas: Add TPS659038 PMIC support J Keerthy
2013-06-17 12:09 ` J Keerthy
2013-06-17 12:09 ` J Keerthy [this message]
2013-06-17 12:09 ` [PATCH 3/4] MFD: Palmas: Add SMPS10_BOOST feature J Keerthy
2013-06-17 12:09 ` [PATCH 4/4] regulator: Palmas: Add TPS659038 support J Keerthy
2013-06-17 12:09 ` J Keerthy
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=1371470954-9124-4-git-send-email-j-keerthy@ti.com \
--to=j-keerthy@ti.com \
--cc=broonie@kernel.org \
--cc=gg@slimlogic.co.uk \
--cc=grant.likely@secretlab.ca \
--cc=ldewangan@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=swarren@nvidia.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.