* [PATCH] regulator: anatop: Convert to regulator_list_voltage_linear()
@ 2012-05-14 3:06 Axel Lin
2012-05-23 10:22 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-05-14 3:06 UTC (permalink / raw)
To: linux-kernel
Cc: Nancy Chen, Ying-Chun Liu (PaulLiu), Liam Girdwood, Mark Brown
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/anatop-regulator.c | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index 49b2112..e433b36 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -96,21 +96,10 @@ static int anatop_get_voltage_sel(struct regulator_dev *reg)
return val - anatop_reg->min_bit_val;
}
-static int anatop_list_voltage(struct regulator_dev *reg, unsigned selector)
-{
- struct anatop_regulator *anatop_reg = rdev_get_drvdata(reg);
- int uv;
-
- uv = anatop_reg->min_voltage + selector * 25000;
- dev_dbg(®->dev, "vddio = %d, selector = %u\n", uv, selector);
-
- return uv;
-}
-
static struct regulator_ops anatop_rops = {
.set_voltage = anatop_set_voltage,
.get_voltage_sel = anatop_get_voltage_sel,
- .list_voltage = anatop_list_voltage,
+ .list_voltage = regulator_list_voltage_linear,
};
static int __devinit anatop_regulator_probe(struct platform_device *pdev)
@@ -178,6 +167,8 @@ static int __devinit anatop_regulator_probe(struct platform_device *pdev)
rdesc->n_voltages = (sreg->max_voltage - sreg->min_voltage)
/ 25000 + 1;
+ rdesc->min_uV = sreg->min_voltage;
+ rdesc->uV_step = 25000;
config.dev = &pdev->dev;
config.init_data = initdata;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: anatop: Convert to regulator_list_voltage_linear()
2012-05-14 3:06 [PATCH] regulator: anatop: Convert to regulator_list_voltage_linear() Axel Lin
@ 2012-05-23 10:22 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-05-23 10:22 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Nancy Chen, Ying-Chun Liu (PaulLiu), Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 123 bytes --]
On Mon, May 14, 2012 at 11:06:44AM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-23 10:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-14 3:06 [PATCH] regulator: anatop: Convert to regulator_list_voltage_linear() Axel Lin
2012-05-23 10:22 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).