regulator: rc5t583: Use regulator_set_voltage_time_sel()
authorAxel Lin <axel.lin@gmail.com>
Tue, 19 Jun 2012 01:26:52 +0000 (09:26 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 24 Jun 2012 11:13:38 +0000 (12:13 +0100)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/rc5t583-regulator.c

index 332eae897dab3665b38282c3256a9e2bac25f753..8bf4e8c9de9a2a811622ff0e8986a8fea9de2735 100644 (file)
@@ -42,7 +42,6 @@ struct rc5t583_regulator_info {
 
        /* Regulator specific turn-on delay  and voltage settling time*/
        int                     enable_uv_per_us;
-       int                     change_uv_per_us;
 
        /* Used by regulator core */
        struct regulator_desc   desc;
@@ -66,17 +65,6 @@ static int rc5t583_regulator_enable_time(struct regulator_dev *rdev)
        return DIV_ROUND_UP(curr_uV, reg->reg_info->enable_uv_per_us);
 }
 
-static int rc5t583_set_voltage_time_sel(struct regulator_dev *rdev,
-               unsigned int old_selector, unsigned int new_selector)
-{
-       struct rc5t583_regulator *reg = rdev_get_drvdata(rdev);
-
-       return DIV_ROUND_UP(abs(new_selector - old_selector) *
-                           rdev->desc->uV_step,
-                           reg->reg_info->change_uv_per_us);
-}
-
-
 static struct regulator_ops rc5t583_ops = {
        .is_enabled             = regulator_is_enabled_regmap,
        .enable                 = regulator_enable_regmap,
@@ -86,7 +74,7 @@ static struct regulator_ops rc5t583_ops = {
        .set_voltage_sel        = regulator_set_voltage_sel_regmap,
        .list_voltage           = regulator_list_voltage_linear,
        .map_voltage            = regulator_map_voltage_linear,
-       .set_voltage_time_sel   = rc5t583_set_voltage_time_sel,
+       .set_voltage_time_sel   = regulator_set_voltage_time_sel,
 };
 
 #define RC5T583_REG(_id, _en_reg, _en_bit, _disc_reg, _disc_bit, \
@@ -96,7 +84,6 @@ static struct regulator_ops rc5t583_ops = {
        .disc_bit       = _disc_bit,                            \
        .deepsleep_reg  = RC5T583_REG_##_id##DAC_DS,            \
        .enable_uv_per_us = _enable_mv * 1000,                  \
-       .change_uv_per_us = 40 * 1000,                          \
        .deepsleep_id   = RC5T583_DS_##_id,                     \
        .desc = {                                               \
                .name = "rc5t583-regulator-"#_id,               \
@@ -111,6 +98,7 @@ static struct regulator_ops rc5t583_ops = {
                .enable_mask = BIT(_en_bit),                    \
                .min_uV = _min_mv * 1000,                       \
                .uV_step = _step_uV,                            \
+               .ramp_delay = 40 * 1000,                        \
        },                                                      \
 }
 
This page took 0.025236 seconds and 5 git commands to generate.