* [PATCH] regulator: tps65910: Convert to use regulator_map_voltage_ascend
@ 2013-04-20 2:30 Axel Lin
2013-04-23 10:41 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-04-20 2:30 UTC (permalink / raw)
To: Mark Brown
Cc: Graeme Gregory, Liam Girdwood, linux-kernel, Laxman Dewangan,
AnilKumar Ch
All regulators have ascendant voltage list in this driver.
Some regulators have more than 200 supported voltages.
e.g.
For TPS65910_REG_VDD1 and TPS65910_REG_VDD2:
n_voltages = VDD1_2_NUM_VOLT_FINE * VDD1_2_NUM_VOLT_COARSE
= 73 * 3
= 219
Thus it worth converting to regulator_map_voltage_ascend rather than use
default regulator_map_voltage_iterate.
For consistent, convert all regulators to regulator_map_voltage_ascend.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/tps65910-regulator.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 6ba6931..45c1644 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -748,6 +748,7 @@ static struct regulator_ops tps65910_ops_dcdc = {
.set_voltage_sel = tps65910_set_voltage_dcdc_sel,
.set_voltage_time_sel = regulator_set_voltage_time_sel,
.list_voltage = tps65910_list_voltage_dcdc,
+ .map_voltage = regulator_map_voltage_ascend,
};
static struct regulator_ops tps65910_ops_vdd3 = {
@@ -758,6 +759,7 @@ static struct regulator_ops tps65910_ops_vdd3 = {
.get_mode = tps65910_get_mode,
.get_voltage = tps65910_get_voltage_vdd3,
.list_voltage = regulator_list_voltage_table,
+ .map_voltage = regulator_map_voltage_ascend,
};
static struct regulator_ops tps65910_ops = {
@@ -769,6 +771,7 @@ static struct regulator_ops tps65910_ops = {
.get_voltage_sel = tps65910_get_voltage_sel,
.set_voltage_sel = tps65910_set_voltage_sel,
.list_voltage = regulator_list_voltage_table,
+ .map_voltage = regulator_map_voltage_ascend,
};
static struct regulator_ops tps65911_ops = {
@@ -780,6 +783,7 @@ static struct regulator_ops tps65911_ops = {
.get_voltage_sel = tps65911_get_voltage_sel,
.set_voltage_sel = tps65911_set_voltage_sel,
.list_voltage = tps65911_list_voltage,
+ .map_voltage = regulator_map_voltage_ascend,
};
static int tps65910_set_ext_sleep_config(struct tps65910_reg *pmic,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: tps65910: Convert to use regulator_map_voltage_ascend
2013-04-20 2:30 [PATCH] regulator: tps65910: Convert to use regulator_map_voltage_ascend Axel Lin
@ 2013-04-23 10:41 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-04-23 10:41 UTC (permalink / raw)
To: Axel Lin
Cc: Graeme Gregory, Liam Girdwood, linux-kernel, Laxman Dewangan,
AnilKumar Ch
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
On Sat, Apr 20, 2013 at 10:30:17AM +0800, Axel Lin wrote:
> All regulators have ascendant voltage list in this driver.
> Some regulators have more than 200 supported voltages.
> e.g.
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:[~2013-04-23 10:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-20 2:30 [PATCH] regulator: tps65910: Convert to use regulator_map_voltage_ascend Axel Lin
2013-04-23 10:41 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox