]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/regulator/driver.h
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / include / linux / regulator / driver.h
index 592cd7c642c22781187ad5c10d4906cbc6a49b32..b8ed16a33c47fc9b4febb65d24db94ec6a5dc9cd 100644 (file)
@@ -42,7 +42,11 @@ enum regulator_status {
  *
  * @set_voltage: Set the voltage for the regulator within the range specified.
  *               The driver should select the voltage closest to min_uV.
+ * @set_voltage_sel: Set the voltage for the regulator using the specified
+ *                   selector.
  * @get_voltage: Return the currently configured voltage for the regulator.
+ * @get_voltage_sel: Return the currently configured voltage selector for the
+ *                   regulator.
  * @list_voltage: Return one of the supported voltages, in microvolts; zero
  *     if the selector indicates a voltage that is unusable on this system;
  *     or negative errno.  Selectors range from zero to one less than
@@ -79,8 +83,11 @@ struct regulator_ops {
        int (*list_voltage) (struct regulator_dev *, unsigned selector);
 
        /* get/set regulator voltage */
-       int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV);
+       int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV,
+                           unsigned *selector);
+       int (*set_voltage_sel) (struct regulator_dev *, unsigned selector);
        int (*get_voltage) (struct regulator_dev *);
+       int (*get_voltage_sel) (struct regulator_dev *);
 
        /* get/set regulator current  */
        int (*set_current_limit) (struct regulator_dev *,
@@ -168,9 +175,9 @@ struct regulator_desc {
  */
 struct regulator_dev {
        struct regulator_desc *desc;
-       int use_count;
-       int open_count;
        int exclusive;
+       u32 use_count;
+       u32 open_count;
 
        /* lists we belong to */
        struct list_head list; /* list of all regulators */
@@ -188,10 +195,14 @@ struct regulator_dev {
        struct regulator_dev *supply;   /* for tree */
 
        void *reg_data;         /* regulator_dev data */
+
+#ifdef CONFIG_DEBUG_FS
+       struct dentry *debugfs;
+#endif
 };
 
 struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
-       struct device *dev, struct regulator_init_data *init_data,
+       struct device *dev, const struct regulator_init_data *init_data,
        void *driver_data);
 void regulator_unregister(struct regulator_dev *rdev);