aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-05-19 22:30:21 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-03 08:19:45 -0400
commitcffc9592fde309deafce12362e0a285108cfa3c8 (patch)
treebdd8ae2815fc8ac4aff7935eda79ee31bcb07cf8 /include/linux/regulator
parentf8f5701bdaf9134b1f90e5044a82c66324d2073f (diff)
regulator: core: Allow drivers to set voltage mapping table in regulator_desc
Some regulator hardware use table based mapping can set volt_table in regulator_desc and use regulator_list_voltage_table() for their list_voltage callback. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/driver.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index b0432cc2b169..80226383e561 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -170,6 +170,7 @@ enum regulator_type {
170 * 170 *
171 * @min_uV: Voltage given by the lowest selector (if linear mapping) 171 * @min_uV: Voltage given by the lowest selector (if linear mapping)
172 * @uV_step: Voltage increase with each selector (if linear mapping) 172 * @uV_step: Voltage increase with each selector (if linear mapping)
173 * @volt_table: Voltage mapping table (if table based mapping)
173 * 174 *
174 * @vsel_reg: Register for selector when using regulator_regmap_X_voltage_ 175 * @vsel_reg: Register for selector when using regulator_regmap_X_voltage_
175 * @vsel_mask: Mask for register bitfield used for selector 176 * @vsel_mask: Mask for register bitfield used for selector
@@ -189,6 +190,8 @@ struct regulator_desc {
189 unsigned int min_uV; 190 unsigned int min_uV;
190 unsigned int uV_step; 191 unsigned int uV_step;
191 192
193 const unsigned int *volt_table;
194
192 unsigned int vsel_reg; 195 unsigned int vsel_reg;
193 unsigned int vsel_mask; 196 unsigned int vsel_mask;
194 unsigned int enable_reg; 197 unsigned int enable_reg;
@@ -271,6 +274,8 @@ int regulator_mode_to_status(unsigned int);
271 274
272int regulator_list_voltage_linear(struct regulator_dev *rdev, 275int regulator_list_voltage_linear(struct regulator_dev *rdev,
273 unsigned int selector); 276 unsigned int selector);
277int regulator_list_voltage_table(struct regulator_dev *rdev,
278 unsigned int selector);
274int regulator_map_voltage_linear(struct regulator_dev *rdev, 279int regulator_map_voltage_linear(struct regulator_dev *rdev,
275 int min_uV, int max_uV); 280 int min_uV, int max_uV);
276int regulator_map_voltage_iterate(struct regulator_dev *rdev, 281int regulator_map_voltage_iterate(struct regulator_dev *rdev,