summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/ab8500.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-03-28 16:11:18 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-01 13:23:39 +0100
commit62ab4111113cf0d54c2b264730533fb53a04cc30 (patch)
tree32248737a2cee93833472b1db4fe20997d5e1a75 /drivers/regulator/ab8500.c
parentb080c78a4e447e9c212c207f725999d4e32c5f19 (diff)
downloadblackbird-op-linux-62ab4111113cf0d54c2b264730533fb53a04cc30.tar.gz
blackbird-op-linux-62ab4111113cf0d54c2b264730533fb53a04cc30.zip
regulator: ab8500: Use regulator_list_voltage_table()
Following a recent move to regulator_list_voltage_table() for all previous abx500 related platforms this converts all recent platform updates over too. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/ab8500.c')
-rw-r--r--drivers/regulator/ab8500.c62
1 files changed, 22 insertions, 40 deletions
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index bade3e2a510d..16f5cf7ec13b 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -96,7 +96,7 @@ static const unsigned int ldo_vaux3_voltages[] = {
2910000,
};
-static const int ldo_vaux56_voltages[] = {
+static const unsigned int ldo_vaux56_voltages[] = {
1800000,
1050000,
1100000,
@@ -107,7 +107,7 @@ static const int ldo_vaux56_voltages[] = {
2790000,
};
-static const int ldo_vaux3_ab8540_voltages[] = {
+static const unsigned int ldo_vaux3_ab8540_voltages[] = {
1200000,
1500000,
1800000,
@@ -129,7 +129,7 @@ static const unsigned int ldo_vintcore_voltages[] = {
1350000,
};
-static const int ldo_sdio_voltages[] = {
+static const unsigned int ldo_sdio_voltages[] = {
1160000,
1050000,
1100000,
@@ -662,6 +662,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_AUX1,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vauxn_voltages),
+ .volt_table = ldo_vauxn_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x04,
@@ -673,8 +674,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x1f,
.voltage_mask = 0x0f,
- .voltages = ldo_vauxn_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vauxn_voltages),
},
[AB8505_LDO_AUX2] = {
.desc = {
@@ -684,6 +683,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_AUX2,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vauxn_voltages),
+ .volt_table = ldo_vauxn_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x04,
@@ -695,8 +695,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x20,
.voltage_mask = 0x0f,
- .voltages = ldo_vauxn_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vauxn_voltages),
},
[AB8505_LDO_AUX3] = {
.desc = {
@@ -706,6 +704,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_AUX3,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vaux3_voltages),
+ .volt_table = ldo_vaux3_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x04,
@@ -717,8 +716,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x21,
.voltage_mask = 0x07,
- .voltages = ldo_vaux3_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vaux3_voltages),
},
[AB8505_LDO_AUX4] = {
.desc = {
@@ -728,6 +725,7 @@ static struct ab8500_regulator_info
.id = AB9540_LDO_AUX4,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vauxn_voltages),
+ .volt_table = ldo_vauxn_voltages,
},
.load_lp_uA = 5000,
/* values for Vaux4Regu register */
@@ -741,8 +739,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x2f,
.voltage_mask = 0x0f,
- .voltages = ldo_vauxn_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vauxn_voltages),
},
[AB8505_LDO_AUX5] = {
.desc = {
@@ -752,6 +748,7 @@ static struct ab8500_regulator_info
.id = AB8505_LDO_AUX5,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vaux56_voltages),
+ .volt_table = ldo_vaux56_voltages,
},
.load_lp_uA = 2000,
/* values for CtrlVaux5 register */
@@ -764,8 +761,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x01,
.voltage_reg = 0x55,
.voltage_mask = 0x07,
- .voltages = ldo_vaux56_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vaux56_voltages),
},
[AB8505_LDO_AUX6] = {
.desc = {
@@ -775,6 +770,7 @@ static struct ab8500_regulator_info
.id = AB8505_LDO_AUX6,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vaux56_voltages),
+ .volt_table = ldo_vaux56_voltages,
},
.load_lp_uA = 2000,
/* values for CtrlVaux6 register */
@@ -787,8 +783,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x01,
.voltage_reg = 0x56,
.voltage_mask = 0x07,
- .voltages = ldo_vaux56_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vaux56_voltages),
},
[AB8505_LDO_INTCORE] = {
.desc = {
@@ -798,6 +792,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_INTCORE,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vintcore_voltages),
+ .volt_table = ldo_vintcore_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x03,
@@ -809,8 +804,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x03,
.voltage_reg = 0x80,
.voltage_mask = 0x38,
- .voltages = ldo_vintcore_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vintcore_voltages),
.voltage_shift = 3,
},
@@ -955,6 +948,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_AUX1,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vauxn_voltages),
+ .volt_table = ldo_vauxn_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x04,
@@ -966,8 +960,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x1f,
.voltage_mask = 0x0f,
- .voltages = ldo_vauxn_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vauxn_voltages),
},
[AB9540_LDO_AUX2] = {
.desc = {
@@ -977,6 +969,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_AUX2,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vauxn_voltages),
+ .volt_table = ldo_vauxn_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x04,
@@ -988,8 +981,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x20,
.voltage_mask = 0x0f,
- .voltages = ldo_vauxn_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vauxn_voltages),
},
[AB9540_LDO_AUX3] = {
.desc = {
@@ -999,6 +990,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_AUX3,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vaux3_voltages),
+ .volt_table = ldo_vaux3_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x04,
@@ -1010,8 +1002,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x21,
.voltage_mask = 0x07,
- .voltages = ldo_vaux3_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vaux3_voltages),
},
[AB9540_LDO_AUX4] = {
.desc = {
@@ -1021,6 +1011,7 @@ static struct ab8500_regulator_info
.id = AB9540_LDO_AUX4,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vauxn_voltages),
+ .volt_table = ldo_vauxn_voltages,
},
.load_lp_uA = 5000,
/* values for Vaux4Regu register */
@@ -1034,8 +1025,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x2f,
.voltage_mask = 0x0f,
- .voltages = ldo_vauxn_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vauxn_voltages),
},
[AB9540_LDO_INTCORE] = {
.desc = {
@@ -1045,6 +1034,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_INTCORE,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vintcore_voltages),
+ .volt_table = ldo_vintcore_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x03,
@@ -1056,8 +1046,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x03,
.voltage_reg = 0x80,
.voltage_mask = 0x38,
- .voltages = ldo_vintcore_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vintcore_voltages),
.voltage_shift = 3,
},
@@ -1203,6 +1191,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_AUX1,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vauxn_voltages),
+ .volt_table = ldo_vauxn_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x04,
@@ -1214,8 +1203,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x1f,
.voltage_mask = 0x0f,
- .voltages = ldo_vauxn_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vauxn_voltages),
},
[AB8540_LDO_AUX2] = {
.desc = {
@@ -1225,6 +1212,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_AUX2,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vauxn_voltages),
+ .volt_table = ldo_vauxn_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x04,
@@ -1236,8 +1224,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x20,
.voltage_mask = 0x0f,
- .voltages = ldo_vauxn_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vauxn_voltages),
},
[AB8540_LDO_AUX3] = {
.desc = {
@@ -1247,6 +1233,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_AUX3,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vaux3_ab8540_voltages),
+ .volt_table = ldo_vaux3_ab8540_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x04,
@@ -1258,8 +1245,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x21,
.voltage_mask = 0x07,
- .voltages = ldo_vaux3_ab8540_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vaux3_ab8540_voltages),
},
[AB8540_LDO_AUX4] = {
.desc = {
@@ -1269,6 +1254,7 @@ static struct ab8500_regulator_info
.id = AB9540_LDO_AUX4,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vauxn_voltages),
+ .volt_table = ldo_vauxn_voltages,
},
.load_lp_uA = 5000,
/* values for Vaux4Regu register */
@@ -1282,8 +1268,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04,
.voltage_reg = 0x2f,
.voltage_mask = 0x0f,
- .voltages = ldo_vauxn_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vauxn_voltages),
},
[AB8540_LDO_INTCORE] = {
.desc = {
@@ -1293,6 +1277,7 @@ static struct ab8500_regulator_info
.id = AB8500_LDO_INTCORE,
.owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vintcore_voltages),
+ .volt_table = ldo_vintcore_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x03,
@@ -1304,8 +1289,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x03,
.voltage_reg = 0x80,
.voltage_mask = 0x38,
- .voltages = ldo_vintcore_voltages,
- .voltages_len = ARRAY_SIZE(ldo_vintcore_voltages),
.voltage_shift = 3,
},
@@ -1420,7 +1403,8 @@ static struct ab8500_regulator_info
.type = REGULATOR_VOLTAGE,
.id = AB8540_LDO_SDIO,
.owner = THIS_MODULE,
- .n_voltages = ARRAY_SIZE(ldo_sdio_voltages),
+ .n_voltages = ARRAY_SIZE(ldo_sdio_voltages),
+ .volt_table = ldo_sdio_voltages,
},
.load_lp_uA = 5000,
.update_bank = 0x03,
@@ -1432,8 +1416,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x03,
.voltage_reg = 0x88,
.voltage_mask = 0x07,
- .voltages = ldo_sdio_voltages,
- .voltages_len = ARRAY_SIZE(ldo_sdio_voltages),
},
};
OpenPOWER on IntegriCloud