aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/palmas.h
diff options
context:
space:
mode:
authorGraeme Gregory <gg@slimlogic.co.uk>2012-08-28 13:47:39 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-09-23 20:51:29 +0200
commit7cc4c92fbc1b539597c00656b3236a57d76022f4 (patch)
treed782a9bc042a6754edf9aa6cd4154d2e2bd80693 /include/linux/mfd/palmas.h
parentmfd: palmas: Add device tree handling to mfd (diff)
downloadlinux-dev-7cc4c92fbc1b539597c00656b3236a57d76022f4.tar.xz
linux-dev-7cc4c92fbc1b539597c00656b3236a57d76022f4.zip
mfd: palmas: Change regulator defns to better suite DT
In order to better fit DT parsing in of regulator definitions re-arrange the platform data struct slightly which requires the definitions of the regulator IDs earlier in the include file. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/palmas.h')
-rw-r--r--include/linux/mfd/palmas.h60
1 files changed, 30 insertions, 30 deletions
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index cfbf79464c19..29f6616e12f0 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -130,16 +130,44 @@ struct palmas_reg_init {
};
+enum palmas_regulators {
+ /* SMPS regulators */
+ PALMAS_REG_SMPS12,
+ PALMAS_REG_SMPS123,
+ PALMAS_REG_SMPS3,
+ PALMAS_REG_SMPS45,
+ PALMAS_REG_SMPS457,
+ PALMAS_REG_SMPS6,
+ PALMAS_REG_SMPS7,
+ PALMAS_REG_SMPS8,
+ PALMAS_REG_SMPS9,
+ PALMAS_REG_SMPS10,
+ /* LDO regulators */
+ PALMAS_REG_LDO1,
+ PALMAS_REG_LDO2,
+ PALMAS_REG_LDO3,
+ PALMAS_REG_LDO4,
+ PALMAS_REG_LDO5,
+ PALMAS_REG_LDO6,
+ PALMAS_REG_LDO7,
+ PALMAS_REG_LDO8,
+ PALMAS_REG_LDO9,
+ PALMAS_REG_LDOLN,
+ PALMAS_REG_LDOUSB,
+ /* Total number of regulators */
+ PALMAS_NUM_REGS,
+};
+
struct palmas_pmic_platform_data {
/* An array of pointers to regulator init data indexed by regulator
* ID
*/
- struct regulator_init_data **reg_data;
+ struct regulator_init_data *reg_data[PALMAS_NUM_REGS];
/* An array of pointers to structures containing sleep mode and DVS
* configuration for regulators indexed by ID
*/
- struct palmas_reg_init **reg_init;
+ struct palmas_reg_init *reg_init[PALMAS_NUM_REGS];
/* use LDO6 for vibrator control */
int ldo6_vibrator;
@@ -291,34 +319,6 @@ enum palmas_irqs {
PALMAS_NUM_IRQ,
};
-enum palmas_regulators {
- /* SMPS regulators */
- PALMAS_REG_SMPS12,
- PALMAS_REG_SMPS123,
- PALMAS_REG_SMPS3,
- PALMAS_REG_SMPS45,
- PALMAS_REG_SMPS457,
- PALMAS_REG_SMPS6,
- PALMAS_REG_SMPS7,
- PALMAS_REG_SMPS8,
- PALMAS_REG_SMPS9,
- PALMAS_REG_SMPS10,
- /* LDO regulators */
- PALMAS_REG_LDO1,
- PALMAS_REG_LDO2,
- PALMAS_REG_LDO3,
- PALMAS_REG_LDO4,
- PALMAS_REG_LDO5,
- PALMAS_REG_LDO6,
- PALMAS_REG_LDO7,
- PALMAS_REG_LDO8,
- PALMAS_REG_LDO9,
- PALMAS_REG_LDOLN,
- PALMAS_REG_LDOUSB,
- /* Total number of regulators */
- PALMAS_NUM_REGS,
-};
-
struct palmas_pmic {
struct palmas *palmas;
struct device *dev;