[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1340806212-30457-2-git-send-email-broonie@opensource.wolfsonmicro.com>
Date: Wed, 27 Jun 2012 15:10:10 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Liam Girdwood <lrg@...com>
Cc: linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [PATCH 2/4] regulator: fixed: Set enable enable_time in regulator_desc
Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
---
drivers/regulator/fixed.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 8bda365..f7b2642 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;
};
@@ -123,13 +122,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);
@@ -155,7 +147,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,
};
@@ -197,12 +188,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;
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists