* [PATCH V1] regulator: tps65910: use appropriate variable names.
@ 2012-01-20 11:06 Laxman Dewangan
[not found] ` <1327057582-6635-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Laxman Dewangan @ 2012-01-20 11:06 UTC (permalink / raw)
To: lrg-l0cyMroinI0,
broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
ldewangan-DDmLM1+adcrQT0dZR+AlfA
Renaming the variables "table" to "voltage_table" and
"table_len" to "n_voltages" of regulator information
to have more meaningful.
Signed-off-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
As per discussion in other patch
regulator: tps65910: Initialize n_voltages for rails.
sending this patch on top of above where the variable
names are renamed to have more meaningful.
drivers/regulator/tps65910-regulator.c | 82 ++++++++++++++++----------------
1 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 3ac5f91..1d13cf9 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -83,8 +83,8 @@ struct tps_info {
const char *name;
unsigned min_uV;
unsigned max_uV;
- u8 table_len;
- const u16 *table;
+ u8 n_voltages;
+ const u16 *voltage_table;
};
static struct tps_info tps65910_regs[] = {
@@ -95,8 +95,8 @@ static struct tps_info tps65910_regs[] = {
.name = "VIO",
.min_uV = 1500000,
.max_uV = 3300000,
- .table_len = ARRAY_SIZE(VIO_VSEL_table),
- .table = VIO_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VIO_VSEL_table),
+ .voltage_table = VIO_VSEL_table,
},
{
.name = "VDD1",
@@ -112,64 +112,64 @@ static struct tps_info tps65910_regs[] = {
.name = "VDD3",
.min_uV = 5000000,
.max_uV = 5000000,
- .table_len = ARRAY_SIZE(VDD3_VSEL_table),
- .table = VDD3_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VDD3_VSEL_table),
+ .voltage_table = VDD3_VSEL_table,
},
{
.name = "VDIG1",
.min_uV = 1200000,
.max_uV = 2700000,
- .table_len = ARRAY_SIZE(VDIG1_VSEL_table),
- .table = VDIG1_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VDIG1_VSEL_table),
+ .voltage_table = VDIG1_VSEL_table,
},
{
.name = "VDIG2",
.min_uV = 1000000,
.max_uV = 1800000,
- .table_len = ARRAY_SIZE(VDIG2_VSEL_table),
- .table = VDIG2_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VDIG2_VSEL_table),
+ .voltage_table = VDIG2_VSEL_table,
},
{
.name = "VPLL",
.min_uV = 1000000,
.max_uV = 2500000,
- .table_len = ARRAY_SIZE(VPLL_VSEL_table),
- .table = VPLL_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VPLL_VSEL_table),
+ .voltage_table = VPLL_VSEL_table,
},
{
.name = "VDAC",
.min_uV = 1800000,
.max_uV = 2850000,
- .table_len = ARRAY_SIZE(VDAC_VSEL_table),
- .table = VDAC_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VDAC_VSEL_table),
+ .voltage_table = VDAC_VSEL_table,
},
{
.name = "VAUX1",
.min_uV = 1800000,
.max_uV = 2850000,
- .table_len = ARRAY_SIZE(VAUX1_VSEL_table),
- .table = VAUX1_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VAUX1_VSEL_table),
+ .voltage_table = VAUX1_VSEL_table,
},
{
.name = "VAUX2",
.min_uV = 1800000,
.max_uV = 3300000,
- .table_len = ARRAY_SIZE(VAUX2_VSEL_table),
- .table = VAUX2_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VAUX2_VSEL_table),
+ .voltage_table = VAUX2_VSEL_table,
},
{
.name = "VAUX33",
.min_uV = 1800000,
.max_uV = 3300000,
- .table_len = ARRAY_SIZE(VAUX33_VSEL_table),
- .table = VAUX33_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VAUX33_VSEL_table),
+ .voltage_table = VAUX33_VSEL_table,
},
{
.name = "VMMC",
.min_uV = 1800000,
.max_uV = 3300000,
- .table_len = ARRAY_SIZE(VMMC_VSEL_table),
- .table = VMMC_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VMMC_VSEL_table),
+ .voltage_table = VMMC_VSEL_table,
},
};
@@ -181,74 +181,74 @@ static struct tps_info tps65911_regs[] = {
.name = "VIO",
.min_uV = 1500000,
.max_uV = 3300000,
- .table_len = ARRAY_SIZE(VIO_VSEL_table),
- .table = VIO_VSEL_table,
+ .n_voltages = ARRAY_SIZE(VIO_VSEL_table),
+ .voltage_table = VIO_VSEL_table,
},
{
.name = "VDD1",
.min_uV = 600000,
.max_uV = 4500000,
- .table_len = 73,
+ .n_voltages = 73,
},
{
.name = "VDD2",
.min_uV = 600000,
.max_uV = 4500000,
- .table_len = 73,
+ .n_voltages = 73,
},
{
.name = "VDDCTRL",
.min_uV = 600000,
.max_uV = 1400000,
- .table_len = 65,
+ .n_voltages = 65,
},
{
.name = "LDO1",
.min_uV = 1000000,
.max_uV = 3300000,
- .table_len = 47,
+ .n_voltages = 47,
},
{
.name = "LDO2",
.min_uV = 1000000,
.max_uV = 3300000,
- .table_len = 47,
+ .n_voltages = 47,
},
{
.name = "LDO3",
.min_uV = 1000000,
.max_uV = 3300000,
- .table_len = 24,
+ .n_voltages = 24,
},
{
.name = "LDO4",
.min_uV = 1000000,
.max_uV = 3300000,
- .table_len = 47,
+ .n_voltages = 47,
},
{
.name = "LDO5",
.min_uV = 1000000,
.max_uV = 3300000,
- .table_len = 24,
+ .n_voltages = 24,
},
{
.name = "LDO6",
.min_uV = 1000000,
.max_uV = 3300000,
- .table_len = 24,
+ .n_voltages = 24,
},
{
.name = "LDO7",
.min_uV = 1000000,
.max_uV = 3300000,
- .table_len = 24,
+ .n_voltages = 24,
},
{
.name = "LDO8",
.min_uV = 1000000,
.max_uV = 3300000,
- .table_len = 24,
+ .n_voltages = 24,
},
};
@@ -586,7 +586,7 @@ static int tps65910_get_voltage(struct regulator_dev *dev)
return -EINVAL;
}
- voltage = pmic->info[id]->table[value] * 1000;
+ voltage = pmic->info[id]->voltage_table[value] * 1000;
return voltage;
}
@@ -636,7 +636,7 @@ static int tps65911_get_voltage(struct regulator_dev *dev)
step_mv = 100;
break;
case TPS65910_REG_VIO:
- return pmic->info[id]->table[value] * 1000;
+ return pmic->info[id]->voltage_table[value] * 1000;
break;
default:
return -EINVAL;
@@ -770,10 +770,10 @@ static int tps65910_list_voltage(struct regulator_dev *dev,
if (id < TPS65910_REG_VIO || id > TPS65910_REG_VMMC)
return -EINVAL;
- if (selector >= pmic->info[id]->table_len)
+ if (selector >= pmic->info[id]->n_voltages)
return -EINVAL;
else
- voltage = pmic->info[id]->table[selector] * 1000;
+ voltage = pmic->info[id]->voltage_table[selector] * 1000;
return voltage;
}
@@ -809,7 +809,7 @@ static int tps65911_list_voltage(struct regulator_dev *dev, unsigned selector)
step_mv = 100;
break;
case TPS65910_REG_VIO:
- return pmic->info[id]->table[selector] * 1000;
+ return pmic->info[id]->voltage_table[selector] * 1000;
default:
return -EINVAL;
}
@@ -940,7 +940,7 @@ static __devinit int tps65910_probe(struct platform_device *pdev)
pmic->desc[i].name = info->name;
pmic->desc[i].id = i;
- pmic->desc[i].n_voltages = info->table_len;
+ pmic->desc[i].n_voltages = info->n_voltages;
if (i == TPS65910_REG_VDD1 || i == TPS65910_REG_VDD2) {
pmic->desc[i].ops = &tps65910_ops_dcdc;
--
1.7.1.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V1] regulator: tps65910: use appropriate variable names.
[not found] ` <1327057582-6635-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2012-01-20 12:11 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-01-20 12:11 UTC (permalink / raw)
To: Laxman Dewangan
Cc: lrg-l0cyMroinI0, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
On Fri, Jan 20, 2012 at 04:36:22PM +0530, Laxman Dewangan wrote:
> Renaming the variables "table" to "voltage_table" and
> "table_len" to "n_voltages" of regulator information
> to have more meaningful.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-20 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 11:06 [PATCH V1] regulator: tps65910: use appropriate variable names Laxman Dewangan
[not found] ` <1327057582-6635-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-01-20 12:11 ` 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).