summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-27 17:27:22 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-03 23:28:41 +0400
commit3d0f267fcd9197d72551baf60165b40a00dfb66a (patch)
tree129abda1e39153e4ad994939f2053ccdf4aa9b0e /drivers/regulator
parent79511ed3225a64f6b7fc749f4f9c1ed82f24f729 (diff)
downloadlinux-3d0f267fcd9197d72551baf60165b40a00dfb66a.tar.xz
regulator: fixed: Set enable enable_time in regulator_desc
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/fixed.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index b8c3a910502a..5adc35aa6cc7 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -36,7 +36,6 @@ struct fixed_voltage_data {
struct regulator_dev *dev;
int microvolts;
int gpio;
- unsigned startup_delay;
bool enable_high;
bool is_enabled;
};
@@ -136,13 +135,6 @@ static int fixed_voltage_disable(struct regulator_dev *dev)
return 0;
}
-static int fixed_voltage_enable_time(struct regulator_dev *dev)
-{
- struct fixed_voltage_data *data = rdev_get_drvdata(dev);
-
- return data->startup_delay;
-}
-
static int fixed_voltage_get_voltage(struct regulator_dev *dev)
{
struct fixed_voltage_data *data = rdev_get_drvdata(dev);
@@ -168,7 +160,6 @@ static struct regulator_ops fixed_voltage_gpio_ops = {
.is_enabled = fixed_voltage_is_enabled,
.enable = fixed_voltage_enable,
.disable = fixed_voltage_disable,
- .enable_time = fixed_voltage_enable_time,
.get_voltage = fixed_voltage_get_voltage,
.list_voltage = fixed_voltage_list_voltage,
};
@@ -213,12 +204,13 @@ static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev)
drvdata->desc.type = REGULATOR_VOLTAGE;
drvdata->desc.owner = THIS_MODULE;
+ drvdata->desc.enable_time = config->startup_delay;
+
if (config->microvolts)
drvdata->desc.n_voltages = 1;
drvdata->microvolts = config->microvolts;
drvdata->gpio = config->gpio;
- drvdata->startup_delay = config->startup_delay;
if (gpio_is_valid(config->gpio)) {
int gpio_flag;