diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-01-28 05:21:05 -0500 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-03-03 09:49:25 -0500 |
commit | 17133dc82422cb118c843c3e9bbd565c37506ec8 (patch) | |
tree | 62cd5f2e61ab4c64b217647d5c72f358f61fe3bb /drivers/regulator | |
parent | 69dc16c325bef32b0a1a1abf15ae4047174cafc1 (diff) |
regulator: Convert fixed voltage regulator to use enable_time()
It had an open coded version in enable().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/fixed.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index ee3e7eb97b1c..a3d3bfc24b1f 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c | |||
@@ -50,8 +50,6 @@ static int fixed_voltage_enable(struct regulator_dev *dev) | |||
50 | if (gpio_is_valid(data->gpio)) { | 50 | if (gpio_is_valid(data->gpio)) { |
51 | gpio_set_value_cansleep(data->gpio, data->enable_high); | 51 | gpio_set_value_cansleep(data->gpio, data->enable_high); |
52 | data->is_enabled = 1; | 52 | data->is_enabled = 1; |
53 | if (data->startup_delay) | ||
54 | udelay(data->startup_delay); | ||
55 | } | 53 | } |
56 | 54 | ||
57 | return 0; | 55 | return 0; |
@@ -69,6 +67,13 @@ static int fixed_voltage_disable(struct regulator_dev *dev) | |||
69 | return 0; | 67 | return 0; |
70 | } | 68 | } |
71 | 69 | ||
70 | static int fixed_voltage_enable_time(struct regulator_dev *dev) | ||
71 | { | ||
72 | struct fixed_voltage_data *data = rdev_get_drvdata(dev); | ||
73 | |||
74 | return data->startup_delay; | ||
75 | } | ||
76 | |||
72 | static int fixed_voltage_get_voltage(struct regulator_dev *dev) | 77 | static int fixed_voltage_get_voltage(struct regulator_dev *dev) |
73 | { | 78 | { |
74 | struct fixed_voltage_data *data = rdev_get_drvdata(dev); | 79 | struct fixed_voltage_data *data = rdev_get_drvdata(dev); |
@@ -91,6 +96,7 @@ static struct regulator_ops fixed_voltage_ops = { | |||
91 | .is_enabled = fixed_voltage_is_enabled, | 96 | .is_enabled = fixed_voltage_is_enabled, |
92 | .enable = fixed_voltage_enable, | 97 | .enable = fixed_voltage_enable, |
93 | .disable = fixed_voltage_disable, | 98 | .disable = fixed_voltage_disable, |
99 | .enable_time = fixed_voltage_enable_time, | ||
94 | .get_voltage = fixed_voltage_get_voltage, | 100 | .get_voltage = fixed_voltage_get_voltage, |
95 | .list_voltage = fixed_voltage_list_voltage, | 101 | .list_voltage = fixed_voltage_list_voltage, |
96 | }; | 102 | }; |