diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2013-09-10 15:45:06 +0530 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-10 18:19:52 +0100 |
commit | c368e5fc2a190923b786f2de3e79430ea3566a25 (patch) | |
tree | 47f6d20005b4aa8e87989a85b3cbde3ec193ced5 /drivers/regulator/fixed.c | |
parent | 5a523605afa7d3b54b2e7041f8c9e6bc39872a7e (diff) |
regulator: fixed: get rid of {get|list}_voltage()
Provide the rail supply voltage through descriptor to the
core and remove the callbacks which implement the get_voltage
and list_voltage.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/fixed.c')
-rw-r--r-- | drivers/regulator/fixed.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index 7610920014d..de811f3b921 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -34,7 +34,6 @@ struct fixed_voltage_data { struct regulator_desc desc; struct regulator_dev *dev; - int microvolts; }; @@ -108,30 +107,7 @@ of_get_fixed_voltage_config(struct device *dev) return config; } -static int fixed_voltage_get_voltage(struct regulator_dev *dev) -{ - struct fixed_voltage_data *data = rdev_get_drvdata(dev); - - if (data->microvolts) - return data->microvolts; - else - return -EINVAL; -} - -static int fixed_voltage_list_voltage(struct regulator_dev *dev, - unsigned selector) -{ - struct fixed_voltage_data *data = rdev_get_drvdata(dev); - - if (selector != 0) - return -EINVAL; - - return data->microvolts; -} - static struct regulator_ops fixed_voltage_ops = { - .get_voltage = fixed_voltage_get_voltage, - .list_voltage = fixed_voltage_list_voltage, }; static int reg_fixed_voltage_probe(struct platform_device *pdev) @@ -186,7 +162,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) if (config->microvolts) drvdata->desc.n_voltages = 1; - drvdata->microvolts = config->microvolts; + drvdata->desc.fixed_uV = config->microvolts; if (config->gpio >= 0) cfg.ena_gpio = config->gpio; @@ -222,7 +198,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) platform_set_drvdata(pdev, drvdata); dev_dbg(&pdev->dev, "%s supplying %duV\n", drvdata->desc.name, - drvdata->microvolts); + drvdata->desc.fixed_uV); return 0; |