public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] regulator: tps65023: Merge tps65020 ldo1 and ldo2 vsel table
@ 2013-04-25  3:31 Axel Lin
  2013-04-25  3:32 ` [PATCH 2/3] regulator: tps65023: Use regulator_map_voltage_ascend Axel Lin
  2013-04-25  3:33 ` [PATCH 3/3] regulator: tps6507x: " Axel Lin
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2013-04-25  3:31 UTC (permalink / raw)
  To: Mark Brown
  Cc: Anuj Aggarwal, Liam Girdwood, linux-kernel, Marcus Folkesson,
	Marek Vasut

tps65020 ldo1 and ldo2 vsel tables are identical, merge them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/tps65023-regulator.c |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index 21a890a..42fea2c 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -107,12 +107,7 @@ static const unsigned int DCDC_FIXED_1800000_VSEL_table[] = {
 };
 
 /* Supported voltage values for LDO regulators for tps65020 */
-static const unsigned int TPS65020_LDO1_VSEL_table[] = {
-	1000000, 1050000, 1100000, 1300000,
-	1800000, 2500000, 3000000, 3300000,
-};
-
-static const unsigned int TPS65020_LDO2_VSEL_table[] = {
+static const unsigned int TPS65020_LDO_VSEL_table[] = {
 	1000000, 1050000, 1100000, 1300000,
 	1800000, 2500000, 3000000, 3300000,
 };
@@ -334,13 +329,13 @@ static const struct tps_info tps65020_regs[] = {
 	},
 	{
 		.name = "LDO1",
-		.table_len = ARRAY_SIZE(TPS65020_LDO1_VSEL_table),
-		.table = TPS65020_LDO1_VSEL_table,
+		.table_len = ARRAY_SIZE(TPS65020_LDO_VSEL_table),
+		.table = TPS65020_LDO_VSEL_table,
 	},
 	{
 		.name = "LDO2",
-		.table_len = ARRAY_SIZE(TPS65020_LDO2_VSEL_table),
-		.table = TPS65020_LDO2_VSEL_table,
+		.table_len = ARRAY_SIZE(TPS65020_LDO_VSEL_table),
+		.table = TPS65020_LDO_VSEL_table,
 	},
 };
 
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] regulator: tps65023: Use regulator_map_voltage_ascend
  2013-04-25  3:31 [PATCH 1/3] regulator: tps65023: Merge tps65020 ldo1 and ldo2 vsel table Axel Lin
@ 2013-04-25  3:32 ` Axel Lin
  2013-04-25  3:33 ` [PATCH 3/3] regulator: tps6507x: " Axel Lin
  1 sibling, 0 replies; 4+ messages in thread
From: Axel Lin @ 2013-04-25  3:32 UTC (permalink / raw)
  To: Mark Brown
  Cc: Anuj Aggarwal, Liam Girdwood, linux-kernel, Marcus Folkesson,
	Marek Vasut

All regulators have ascendant voltage list in this driver.
Use regulator_map_voltage_ascend for them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/tps65023-regulator.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index 42fea2c..9d053e2 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -180,6 +180,7 @@ static struct regulator_ops tps65023_dcdc_ops = {
 	.get_voltage_sel = tps65023_dcdc_get_voltage_sel,
 	.set_voltage_sel = tps65023_dcdc_set_voltage_sel,
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 };
 
 /* Operations permitted on LDOx */
@@ -190,6 +191,7 @@ static struct regulator_ops tps65023_ldo_ops = {
 	.get_voltage_sel = regulator_get_voltage_sel_regmap,
 	.set_voltage_sel = regulator_set_voltage_sel_regmap,
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 };
 
 static struct regmap_config tps65023_regmap_config = {
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] regulator: tps6507x: Use regulator_map_voltage_ascend
  2013-04-25  3:31 [PATCH 1/3] regulator: tps65023: Merge tps65020 ldo1 and ldo2 vsel table Axel Lin
  2013-04-25  3:32 ` [PATCH 2/3] regulator: tps65023: Use regulator_map_voltage_ascend Axel Lin
@ 2013-04-25  3:33 ` Axel Lin
  2013-04-25 10:46   ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2013-04-25  3:33 UTC (permalink / raw)
  To: Mark Brown
  Cc: Anuj Aggarwal, Liam Girdwood, linux-kernel, Marcus Folkesson,
	Marek Vasut

All regulators have ascendant voltage list in this driver.
Use regulator_map_voltage_ascend for them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/tps6507x-regulator.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c
index 54aa2da..4117ff5 100644
--- a/drivers/regulator/tps6507x-regulator.c
+++ b/drivers/regulator/tps6507x-regulator.c
@@ -356,6 +356,7 @@ static struct regulator_ops tps6507x_pmic_ops = {
 	.get_voltage_sel = tps6507x_pmic_get_voltage_sel,
 	.set_voltage_sel = tps6507x_pmic_set_voltage_sel,
 	.list_voltage = regulator_list_voltage_table,
+	.map_voltage = regulator_map_voltage_ascend,
 };
 
 #ifdef CONFIG_OF
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/3] regulator: tps6507x: Use regulator_map_voltage_ascend
  2013-04-25  3:33 ` [PATCH 3/3] regulator: tps6507x: " Axel Lin
@ 2013-04-25 10:46   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-04-25 10:46 UTC (permalink / raw)
  To: Axel Lin
  Cc: Anuj Aggarwal, Liam Girdwood, linux-kernel, Marcus Folkesson,
	Marek Vasut

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

On Thu, Apr 25, 2013 at 11:33:42AM +0800, Axel Lin wrote:
> All regulators have ascendant voltage list in this driver.
> Use regulator_map_voltage_ascend for them.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-25 10:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25  3:31 [PATCH 1/3] regulator: tps65023: Merge tps65020 ldo1 and ldo2 vsel table Axel Lin
2013-04-25  3:32 ` [PATCH 2/3] regulator: tps65023: Use regulator_map_voltage_ascend Axel Lin
2013-04-25  3:33 ` [PATCH 3/3] regulator: tps6507x: " Axel Lin
2013-04-25 10:46   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox