diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-07-03 22:19:46 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-04 07:38:35 -0400 |
commit | a2a8222be8385818ade54554a50f7904ed0e506f (patch) | |
tree | 62884f946722b0aa9f30ad77becffb42fbeafd75 | |
parent | 94f48ab32b5a875fcf2f62e72de8f666136d98ba (diff) |
regulator: gpio-regulator: Set enable enable_time in regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | drivers/regulator/gpio-regulator.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 242851a4c1a6..3ed8d158833b 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c | |||
@@ -39,7 +39,6 @@ struct gpio_regulator_data { | |||
39 | int enable_gpio; | 39 | int enable_gpio; |
40 | bool enable_high; | 40 | bool enable_high; |
41 | bool is_enabled; | 41 | bool is_enabled; |
42 | unsigned startup_delay; | ||
43 | 42 | ||
44 | struct gpio *gpios; | 43 | struct gpio *gpios; |
45 | int nr_gpios; | 44 | int nr_gpios; |
@@ -81,13 +80,6 @@ static int gpio_regulator_disable(struct regulator_dev *dev) | |||
81 | return 0; | 80 | return 0; |
82 | } | 81 | } |
83 | 82 | ||
84 | static int gpio_regulator_enable_time(struct regulator_dev *dev) | ||
85 | { | ||
86 | struct gpio_regulator_data *data = rdev_get_drvdata(dev); | ||
87 | |||
88 | return data->startup_delay; | ||
89 | } | ||
90 | |||
91 | static int gpio_regulator_get_value(struct regulator_dev *dev) | 83 | static int gpio_regulator_get_value(struct regulator_dev *dev) |
92 | { | 84 | { |
93 | struct gpio_regulator_data *data = rdev_get_drvdata(dev); | 85 | struct gpio_regulator_data *data = rdev_get_drvdata(dev); |
@@ -156,7 +148,6 @@ static struct regulator_ops gpio_regulator_voltage_ops = { | |||
156 | .is_enabled = gpio_regulator_is_enabled, | 148 | .is_enabled = gpio_regulator_is_enabled, |
157 | .enable = gpio_regulator_enable, | 149 | .enable = gpio_regulator_enable, |
158 | .disable = gpio_regulator_disable, | 150 | .disable = gpio_regulator_disable, |
159 | .enable_time = gpio_regulator_enable_time, | ||
160 | .get_voltage = gpio_regulator_get_value, | 151 | .get_voltage = gpio_regulator_get_value, |
161 | .set_voltage = gpio_regulator_set_voltage, | 152 | .set_voltage = gpio_regulator_set_voltage, |
162 | .list_voltage = gpio_regulator_list_voltage, | 153 | .list_voltage = gpio_regulator_list_voltage, |
@@ -166,7 +157,6 @@ static struct regulator_ops gpio_regulator_current_ops = { | |||
166 | .is_enabled = gpio_regulator_is_enabled, | 157 | .is_enabled = gpio_regulator_is_enabled, |
167 | .enable = gpio_regulator_enable, | 158 | .enable = gpio_regulator_enable, |
168 | .disable = gpio_regulator_disable, | 159 | .disable = gpio_regulator_disable, |
169 | .enable_time = gpio_regulator_enable_time, | ||
170 | .get_current_limit = gpio_regulator_get_value, | 160 | .get_current_limit = gpio_regulator_get_value, |
171 | .set_current_limit = gpio_regulator_set_current_limit, | 161 | .set_current_limit = gpio_regulator_set_current_limit, |
172 | }; | 162 | }; |
@@ -213,6 +203,7 @@ static int __devinit gpio_regulator_probe(struct platform_device *pdev) | |||
213 | drvdata->nr_states = config->nr_states; | 203 | drvdata->nr_states = config->nr_states; |
214 | 204 | ||
215 | drvdata->desc.owner = THIS_MODULE; | 205 | drvdata->desc.owner = THIS_MODULE; |
206 | drvdata->desc.enable_time = config->startup_delay; | ||
216 | 207 | ||
217 | /* handle regulator type*/ | 208 | /* handle regulator type*/ |
218 | switch (config->type) { | 209 | switch (config->type) { |
@@ -233,7 +224,6 @@ static int __devinit gpio_regulator_probe(struct platform_device *pdev) | |||
233 | } | 224 | } |
234 | 225 | ||
235 | drvdata->enable_gpio = config->enable_gpio; | 226 | drvdata->enable_gpio = config->enable_gpio; |
236 | drvdata->startup_delay = config->startup_delay; | ||
237 | 227 | ||
238 | if (gpio_is_valid(config->enable_gpio)) { | 228 | if (gpio_is_valid(config->enable_gpio)) { |
239 | drvdata->enable_high = config->enable_high; | 229 | drvdata->enable_high = config->enable_high; |