aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator/driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r--include/linux/regulator/driver.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 592cd7c642c2..b8ed16a33c47 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -42,7 +42,11 @@ enum regulator_status {
42 * 42 *
43 * @set_voltage: Set the voltage for the regulator within the range specified. 43 * @set_voltage: Set the voltage for the regulator within the range specified.
44 * The driver should select the voltage closest to min_uV. 44 * The driver should select the voltage closest to min_uV.
45 * @set_voltage_sel: Set the voltage for the regulator using the specified
46 * selector.
45 * @get_voltage: Return the currently configured voltage for the regulator. 47 * @get_voltage: Return the currently configured voltage for the regulator.
48 * @get_voltage_sel: Return the currently configured voltage selector for the
49 * regulator.
46 * @list_voltage: Return one of the supported voltages, in microvolts; zero 50 * @list_voltage: Return one of the supported voltages, in microvolts; zero
47 * if the selector indicates a voltage that is unusable on this system; 51 * if the selector indicates a voltage that is unusable on this system;
48 * or negative errno. Selectors range from zero to one less than 52 * or negative errno. Selectors range from zero to one less than
@@ -79,8 +83,11 @@ struct regulator_ops {
79 int (*list_voltage) (struct regulator_dev *, unsigned selector); 83 int (*list_voltage) (struct regulator_dev *, unsigned selector);
80 84
81 /* get/set regulator voltage */ 85 /* get/set regulator voltage */
82 int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV); 86 int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV,
87 unsigned *selector);
88 int (*set_voltage_sel) (struct regulator_dev *, unsigned selector);
83 int (*get_voltage) (struct regulator_dev *); 89 int (*get_voltage) (struct regulator_dev *);
90 int (*get_voltage_sel) (struct regulator_dev *);
84 91
85 /* get/set regulator current */ 92 /* get/set regulator current */
86 int (*set_current_limit) (struct regulator_dev *, 93 int (*set_current_limit) (struct regulator_dev *,
@@ -168,9 +175,9 @@ struct regulator_desc {
168 */ 175 */
169struct regulator_dev { 176struct regulator_dev {
170 struct regulator_desc *desc; 177 struct regulator_desc *desc;
171 int use_count;
172 int open_count;
173 int exclusive; 178 int exclusive;
179 u32 use_count;
180 u32 open_count;
174 181
175 /* lists we belong to */ 182 /* lists we belong to */
176 struct list_head list; /* list of all regulators */ 183 struct list_head list; /* list of all regulators */
@@ -188,10 +195,14 @@ struct regulator_dev {
188 struct regulator_dev *supply; /* for tree */ 195 struct regulator_dev *supply; /* for tree */
189 196
190 void *reg_data; /* regulator_dev data */ 197 void *reg_data; /* regulator_dev data */
198
199#ifdef CONFIG_DEBUG_FS
200 struct dentry *debugfs;
201#endif
191}; 202};
192 203
193struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, 204struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
194 struct device *dev, struct regulator_init_data *init_data, 205 struct device *dev, const struct regulator_init_data *init_data,
195 void *driver_data); 206 void *driver_data);
196void regulator_unregister(struct regulator_dev *rdev); 207void regulator_unregister(struct regulator_dev *rdev);
197 208