]> git.karo-electronics.de Git - linux-beck.git/commitdiff
regulator: core: Change the unit of ramp_delay from mV/uS to uV/uS
authorAxel Lin <axel.lin@gmail.com>
Mon, 18 Jun 2012 06:03:16 +0000 (14:03 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 18 Jun 2012 09:56:58 +0000 (10:56 +0100)
This change makes it possible to set ramp_delay with 0.xxx mV/uS without
truncation issue.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Documentation/devicetree/bindings/regulator/regulator.txt
drivers/regulator/core.c
include/linux/regulator/driver.h
include/linux/regulator/machine.h

index d0a7b1296a361017cba250ea9b9aeeeed87ec02a..bec5d574741128123f5cdb26ade5ce122ce008c9 100644 (file)
@@ -10,7 +10,7 @@ Optional properties:
 - regulator-always-on: boolean, regulator should never be disabled
 - regulator-boot-on: bootloader/firmware enabled regulator
 - <name>-supply: phandle to the parent supply/regulator node
-- regulator-ramp-delay: ramp delay for regulator(in mV/uS)
+- regulator-ramp-delay: ramp delay for regulator(in uV/uS)
 
 Example:
 
index 73a3d874ca6e31b9e785d45f7085490d7431957f..ce0a3462e0de5edc7b39e085f5a4377893c6d0ee 100644 (file)
@@ -2319,11 +2319,11 @@ int regulator_set_voltage_time_sel(struct regulator_dev *rdev,
        if (rdev->desc->uV_step) {
                return DIV_ROUND_UP(rdev->desc->uV_step *
                                    abs(new_selector - old_selector),
-                                   ramp_delay * 1000);
+                                   ramp_delay);
        } else if (rdev->desc->volt_table) {
                return DIV_ROUND_UP(abs(rdev->desc->volt_table[new_selector] -
                                        rdev->desc->volt_table[old_selector]),
-                                   ramp_delay * 1000);
+                                   ramp_delay);
        } else {
                rdev_warn(rdev, "Unsupported voltage mapping settings\n");
        }
index ddc155d262da1eedb8a0ec7fa44844cc64d2b302..84f999ed394bb1a51398785805c0198f19797c84 100644 (file)
@@ -173,7 +173,7 @@ enum regulator_type {
  *
  * @min_uV: Voltage given by the lowest selector (if linear mapping)
  * @uV_step: Voltage increase with each selector (if linear mapping)
- * @ramp_delay: Time to settle down after voltage change (unit: mV/us)
+ * @ramp_delay: Time to settle down after voltage change (unit: uV/us)
  * @volt_table: Voltage mapping table (if table based mapping)
  *
  * @vsel_reg: Register for selector when using regulator_regmap_X_voltage_
index 5f37ad3cc1725229b841c1e8532ca4144360ada4..40dd0a394cfa95c1f470e0c2bbc6ee334005bef9 100644 (file)
@@ -92,7 +92,7 @@ struct regulator_state {
  *                 mode.
  * @initial_state: Suspend state to set by default.
  * @initial_mode: Mode to set at startup.
- * @ramp_delay: Time to settle down after voltage change (unit: mV/us)
+ * @ramp_delay: Time to settle down after voltage change (unit: uV/us)
  */
 struct regulation_constraints {