]> git.sur5r.net Git - u-boot/commitdiff
regulator: Change get_enable return type to integer from bool
authorKeerthy <j-keerthy@ti.com>
Tue, 13 Jun 2017 04:23:45 +0000 (09:53 +0530)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 19 Jul 2017 10:13:59 +0000 (19:13 +0900)
Change get_enable return type to int so errors can be returned.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/power/regulator/regulator-uclass.c
include/power/regulator.h

index 0a1d1b36c067c0334600ac6cf81c0ebf62cc8c9c..426a933d66d688cd6402eb1b0a7b3d70e6cf47b0 100644 (file)
@@ -96,7 +96,7 @@ int regulator_set_current(struct udevice *dev, int uA)
        return ops->set_current(dev, uA);
 }
 
-bool regulator_get_enable(struct udevice *dev)
+int regulator_get_enable(struct udevice *dev)
 {
        const struct dm_regulator_ops *ops = dev_get_driver_ops(dev);
 
index 1a8e5753d789f1cd786b0ad7e5564334bca460d4..2bbc1e51b345b21469d0f4d07180a9acfa3d0fae 100644 (file)
@@ -211,9 +211,9 @@ struct dm_regulator_ops {
         * @dev           - regulator device
         * Sets:
         * @enable         - set true - enable or false - disable
-        * @return true/false for get; or 0 / -errno for set.
+        * @return true/false for get or -errno if fail; 0 / -errno for set.
         */
-       bool (*get_enable)(struct udevice *dev);
+       int (*get_enable)(struct udevice *dev);
        int (*set_enable)(struct udevice *dev, bool enable);
 
        /**
@@ -291,9 +291,9 @@ int regulator_set_current(struct udevice *dev, int uA);
  * regulator_get_enable: get regulator device enable state.
  *
  * @dev    - pointer to the regulator device
- * @return - true/false of enable state
+ * @return - true/false of enable state or -errno val if fails
  */
-bool regulator_get_enable(struct udevice *dev);
+int regulator_get_enable(struct udevice *dev);
 
 /**
  * regulator_set_enable: set regulator enable state