summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2013-06-24 14:39:53 +0200
committerMyungJoo Ham <myungjoo.ham@samsung.com>2013-11-15 13:51:48 +0900
commit2f58ddf0b16be3f2feee44b0d171e18cd6808d75 (patch)
tree25cd417b9fc3aa827a1c163765662f98e5cbdbd7 /include
parent2afb23963557685a0f96b0d9bc8ac14bff25e12e (diff)
downloadlinux-3.10-2f58ddf0b16be3f2feee44b0d171e18cd6808d75.tar.gz
linux-3.10-2f58ddf0b16be3f2feee44b0d171e18cd6808d75.tar.bz2
linux-3.10-2f58ddf0b16be3f2feee44b0d171e18cd6808d75.zip
regulator: max8998: Use arrays for specifying voltages in platform data
This patch modifies the platform data of max8998 to use arrays for specifying predefined voltages of buck1 and buck2 instead of separate field for each voltage. This allows to simplify the code a bit and will help in adding support for Device Tree, which will be introduced in further patch. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/max8998.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/include/linux/mfd/max8998.h b/include/linux/mfd/max8998.h
index 75471183b87..ca56bb03bc6 100644
--- a/include/linux/mfd/max8998.h
+++ b/include/linux/mfd/max8998.h
@@ -73,12 +73,8 @@ struct max8998_regulator_data {
* @buck_voltage_lock: Do NOT change the values of the following six
* registers set by buck?_voltage?. The voltage of BUCK1/2 cannot
* be other than the preset values.
- * @buck1_voltage1: BUCK1 DVS mode 1 voltage register
- * @buck1_voltage2: BUCK1 DVS mode 2 voltage register
- * @buck1_voltage3: BUCK1 DVS mode 3 voltage register
- * @buck1_voltage4: BUCK1 DVS mode 4 voltage register
- * @buck2_voltage1: BUCK2 DVS mode 1 voltage register
- * @buck2_voltage2: BUCK2 DVS mode 2 voltage register
+ * @buck1_voltage: BUCK1 DVS mode 1 voltage registers
+ * @buck2_voltage: BUCK2 DVS mode 2 voltage registers
* @buck1_set1: BUCK1 gpio pin 1 to set output voltage
* @buck1_set2: BUCK1 gpio pin 2 to set output voltage
* @buck1_default_idx: Default for BUCK1 gpio pin 1, 2
@@ -103,12 +99,8 @@ struct max8998_platform_data {
unsigned int irq_base;
int ono;
bool buck_voltage_lock;
- int buck1_voltage1;
- int buck1_voltage2;
- int buck1_voltage3;
- int buck1_voltage4;
- int buck2_voltage1;
- int buck2_voltage2;
+ int buck1_voltage[4];
+ int buck2_voltage[2];
int buck1_set1;
int buck1_set2;
int buck1_default_idx;