summaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/palmas.h
diff options
context:
space:
mode:
authorJ Keerthy <j-keerthy@ti.com>2013-06-19 11:27:48 +0530
committerSamuel Ortiz <sameo@linux.intel.com>2013-06-20 11:29:18 +0200
commit1ffb0be3ad6186b421921de91092917f0b3ee3e2 (patch)
tree648c9f7c74880fbfb921a6b95c9e67ce92ae59d9 /include/linux/mfd/palmas.h
parentad522f4e351d020714959d9570baf3de7fcbad11 (diff)
downloadop-kernel-dev-1ffb0be3ad6186b421921de91092917f0b3ee3e2.zip
op-kernel-dev-1ffb0be3ad6186b421921de91092917f0b3ee3e2.tar.gz
mfd: palmas: Add SMPS10_BOOST feature
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> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/palmas.h')
-rw-r--r--include/linux/mfd/palmas.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 8f21daf..98058ca 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -32,6 +32,19 @@
((a) == PALMAS_CHIP_ID))
#define is_palmas_charger(a) ((a) == PALMAS_CHIP_CHARGER_ID)
+/**
+ * Palmas PMIC feature types
+ *
+ * PALMAS_PMIC_FEATURE_SMPS10_BOOST - used when the PMIC provides SMPS10_BOOST
+ * regulator.
+ *
+ * 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_SMPS10_BOOST BIT(0)
+#define PALMAS_PMIC_HAS(b, f) \
+ ((b)->features & PALMAS_PMIC_FEATURE_ ## f)
+
struct palmas_pmic;
struct palmas_gpadc;
struct palmas_resource;
@@ -46,6 +59,7 @@ struct palmas {
/* Stored chip id */
int id;
+ unsigned int features;
/* IRQ Data */
int irq;
u32 irq_mask;
OpenPOWER on IntegriCloud