]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/regulator/driver.h
regulator: add get_status()
[linux-2.6-omap-h63xx.git] / include / linux / regulator / driver.h
index 2dae05705f13e21b9d3410b6c5dfb494a1b9bab8..6e957aae7629f33fe2cd4e7dc1f1ecb70a8552e4 100644 (file)
 struct regulator_dev;
 struct regulator_init_data;
 
+enum regulator_status {
+       REGULATOR_STATUS_OFF,
+       REGULATOR_STATUS_ON,
+       REGULATOR_STATUS_ERROR,
+       /* fast/normal/idle/standby are flavors of "on" */
+       REGULATOR_STATUS_FAST,
+       REGULATOR_STATUS_NORMAL,
+       REGULATOR_STATUS_IDLE,
+       REGULATOR_STATUS_STANDBY,
+};
+
 /**
  * struct regulator_ops - regulator operations.
  *
@@ -72,6 +83,12 @@ struct regulator_ops {
        int (*set_mode) (struct regulator_dev *, unsigned int mode);
        unsigned int (*get_mode) (struct regulator_dev *);
 
+       /* report regulator status ... most other accessors report
+        * control inputs, this reports results of combining inputs
+        * from Linux (and other sources) with the actual load.
+        */
+       int (*get_status)(struct regulator_dev *);
+
        /* get most efficient regulator operating mode for load */
        unsigned int (*get_optimum_mode) (struct regulator_dev *, int input_uV,
                                          int output_uV, int load_uA);