]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/regulator/driver.h
regulator: Add initial per-regulator debugfs support
[mv-sheeva.git] / include / linux / regulator / driver.h
index bf3e653591b9a970b0108765fa6bc8f852e3cea5..b8ed16a33c47fc9b4febb65d24db94ec6a5dc9cd 100644 (file)
@@ -42,6 +42,8 @@ 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.
@@ -83,6 +85,7 @@ struct regulator_ops {
        /* get/set regulator voltage */
        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 *);
 
@@ -172,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 */
@@ -192,6 +195,10 @@ 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,