regulator: ab8500: Use regulator_list_voltage_table() to look-up voltages

The regulator framework offers a generic regulator_list_voltage_table()
function which can directly look-up a regulator's voltage capabilities
using a table provided through the desc structure. This patch ensures
that information is available.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Lee Jones 2013-04-02 13:24:18 +01:00 committed by Mark Brown
parent 5fc9da6d37
commit d319310395

View File

@ -937,7 +937,7 @@ static struct ab8500_regulator_info
* Variable Voltage Regulators * Variable Voltage Regulators
* name, min mV, max mV, * name, min mV, max mV,
* update bank, reg, mask, enable val * update bank, reg, mask, enable val
* volt bank, reg, mask, table, table length * volt bank, reg, mask
*/ */
[AB8505_LDO_AUX1] = { [AB8505_LDO_AUX1] = {
.desc = { .desc = {
@ -1151,8 +1151,6 @@ static struct ab8500_regulator_info
.voltage_reg = 0x57, .voltage_reg = 0x57,
.voltage_mask = 0x7, .voltage_mask = 0x7,
.voltage_shift = 4, .voltage_shift = 4,
.voltages = ldo_vaudio_voltages,
.voltages_len = ARRAY_SIZE(ldo_vaudio_voltages),
}, },
[AB8505_LDO_ANAMIC1] = { [AB8505_LDO_ANAMIC1] = {
.desc = { .desc = {
@ -1234,8 +1232,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04, .voltage_bank = 0x04,
.voltage_reg = 0x29, .voltage_reg = 0x29,
.voltage_mask = 0x7, .voltage_mask = 0x7,
.voltages = ldo_vana_voltages,
.voltages_len = ARRAY_SIZE(ldo_vana_voltages),
}, },
}; };
@ -1246,7 +1242,7 @@ static struct ab8500_regulator_info
* Variable Voltage Regulators * Variable Voltage Regulators
* name, min mV, max mV, * name, min mV, max mV,
* update bank, reg, mask, enable val * update bank, reg, mask, enable val
* volt bank, reg, mask, table, table length * volt bank, reg, mask
*/ */
[AB9540_LDO_AUX1] = { [AB9540_LDO_AUX1] = {
.desc = { .desc = {
@ -1489,7 +1485,7 @@ static struct ab8500_regulator_info
* Variable Voltage Regulators * Variable Voltage Regulators
* name, min mV, max mV, * name, min mV, max mV,
* update bank, reg, mask, enable val * update bank, reg, mask, enable val
* volt bank, reg, mask, table, table length * volt bank, reg, mask
*/ */
[AB8540_LDO_AUX1] = { [AB8540_LDO_AUX1] = {
.desc = { .desc = {
@ -1592,6 +1588,7 @@ static struct ab8500_regulator_info
.id = AB8540_LDO_AUX5, .id = AB8540_LDO_AUX5,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages), .n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
.volt_table = ldo_vaux56_ab8540_voltages,
}, },
.load_lp_uA = 20000, .load_lp_uA = 20000,
/* values for Vaux5Regu register */ /* values for Vaux5Regu register */
@ -1605,8 +1602,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04, .voltage_bank = 0x04,
.voltage_reg = 0x33, .voltage_reg = 0x33,
.voltage_mask = 0x3f, .voltage_mask = 0x3f,
.voltages = ldo_vaux56_ab8540_voltages,
.voltages_len = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
}, },
[AB8540_LDO_AUX6] = { [AB8540_LDO_AUX6] = {
.desc = { .desc = {
@ -1616,6 +1611,7 @@ static struct ab8500_regulator_info
.id = AB8540_LDO_AUX6, .id = AB8540_LDO_AUX6,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages), .n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
.volt_table = ldo_vaux56_ab8540_voltages,
}, },
.load_lp_uA = 20000, .load_lp_uA = 20000,
/* values for Vaux6Regu register */ /* values for Vaux6Regu register */
@ -1629,8 +1625,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x04, .voltage_bank = 0x04,
.voltage_reg = 0x36, .voltage_reg = 0x36,
.voltage_mask = 0x3f, .voltage_mask = 0x3f,
.voltages = ldo_vaux56_ab8540_voltages,
.voltages_len = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
}, },
[AB8540_LDO_INTCORE] = { [AB8540_LDO_INTCORE] = {
.desc = { .desc = {
@ -1743,6 +1737,7 @@ static struct ab8500_regulator_info
.id = AB8540_LDO_DMIC, .id = AB8540_LDO_DMIC,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.n_voltages = ARRAY_SIZE(ldo_vdmic_voltages), .n_voltages = ARRAY_SIZE(ldo_vdmic_voltages),
.volt_table = ldo_vdmic_voltages,
}, },
.load_lp_uA = 1000, .load_lp_uA = 1000,
.update_bank = 0x03, .update_bank = 0x03,
@ -1752,8 +1747,6 @@ static struct ab8500_regulator_info
.voltage_bank = 0x03, .voltage_bank = 0x03,
.voltage_reg = 0x83, .voltage_reg = 0x83,
.voltage_mask = 0xc0, .voltage_mask = 0xc0,
.voltages = ldo_vdmic_voltages,
.voltages_len = ARRAY_SIZE(ldo_vdmic_voltages),
}, },
/* /*