aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-04-02 08:24:18 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-03 13:40:27 -0400
commitd319310395bdaf3d99fdd221d7adcdb7270fb3cc (patch)
tree1c78292744221771ea1f0b4347f666f9c781e185
parent5fc9da6d372cc2a75beef7c65b7559fcd1a2716e (diff)
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>
-rw-r--r--drivers/regulator/ab8500.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 7892a516d074..bb574bfaac30 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -937,7 +937,7 @@ static struct ab8500_regulator_info
937 * Variable Voltage Regulators 937 * Variable Voltage Regulators
938 * name, min mV, max mV, 938 * name, min mV, max mV,
939 * update bank, reg, mask, enable val 939 * update bank, reg, mask, enable val
940 * volt bank, reg, mask, table, table length 940 * volt bank, reg, mask
941 */ 941 */
942 [AB8505_LDO_AUX1] = { 942 [AB8505_LDO_AUX1] = {
943 .desc = { 943 .desc = {
@@ -1151,8 +1151,6 @@ static struct ab8500_regulator_info
1151 .voltage_reg = 0x57, 1151 .voltage_reg = 0x57,
1152 .voltage_mask = 0x7, 1152 .voltage_mask = 0x7,
1153 .voltage_shift = 4, 1153 .voltage_shift = 4,
1154 .voltages = ldo_vaudio_voltages,
1155 .voltages_len = ARRAY_SIZE(ldo_vaudio_voltages),
1156 }, 1154 },
1157 [AB8505_LDO_ANAMIC1] = { 1155 [AB8505_LDO_ANAMIC1] = {
1158 .desc = { 1156 .desc = {
@@ -1234,8 +1232,6 @@ static struct ab8500_regulator_info
1234 .voltage_bank = 0x04, 1232 .voltage_bank = 0x04,
1235 .voltage_reg = 0x29, 1233 .voltage_reg = 0x29,
1236 .voltage_mask = 0x7, 1234 .voltage_mask = 0x7,
1237 .voltages = ldo_vana_voltages,
1238 .voltages_len = ARRAY_SIZE(ldo_vana_voltages),
1239 }, 1235 },
1240}; 1236};
1241 1237
@@ -1246,7 +1242,7 @@ static struct ab8500_regulator_info
1246 * Variable Voltage Regulators 1242 * Variable Voltage Regulators
1247 * name, min mV, max mV, 1243 * name, min mV, max mV,
1248 * update bank, reg, mask, enable val 1244 * update bank, reg, mask, enable val
1249 * volt bank, reg, mask, table, table length 1245 * volt bank, reg, mask
1250 */ 1246 */
1251 [AB9540_LDO_AUX1] = { 1247 [AB9540_LDO_AUX1] = {
1252 .desc = { 1248 .desc = {
@@ -1489,7 +1485,7 @@ static struct ab8500_regulator_info
1489 * Variable Voltage Regulators 1485 * Variable Voltage Regulators
1490 * name, min mV, max mV, 1486 * name, min mV, max mV,
1491 * update bank, reg, mask, enable val 1487 * update bank, reg, mask, enable val
1492 * volt bank, reg, mask, table, table length 1488 * volt bank, reg, mask
1493 */ 1489 */
1494 [AB8540_LDO_AUX1] = { 1490 [AB8540_LDO_AUX1] = {
1495 .desc = { 1491 .desc = {
@@ -1592,6 +1588,7 @@ static struct ab8500_regulator_info
1592 .id = AB8540_LDO_AUX5, 1588 .id = AB8540_LDO_AUX5,
1593 .owner = THIS_MODULE, 1589 .owner = THIS_MODULE,
1594 .n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages), 1590 .n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1591 .volt_table = ldo_vaux56_ab8540_voltages,
1595 }, 1592 },
1596 .load_lp_uA = 20000, 1593 .load_lp_uA = 20000,
1597 /* values for Vaux5Regu register */ 1594 /* values for Vaux5Regu register */
@@ -1605,8 +1602,6 @@ static struct ab8500_regulator_info
1605 .voltage_bank = 0x04, 1602 .voltage_bank = 0x04,
1606 .voltage_reg = 0x33, 1603 .voltage_reg = 0x33,
1607 .voltage_mask = 0x3f, 1604 .voltage_mask = 0x3f,
1608 .voltages = ldo_vaux56_ab8540_voltages,
1609 .voltages_len = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1610 }, 1605 },
1611 [AB8540_LDO_AUX6] = { 1606 [AB8540_LDO_AUX6] = {
1612 .desc = { 1607 .desc = {
@@ -1616,6 +1611,7 @@ static struct ab8500_regulator_info
1616 .id = AB8540_LDO_AUX6, 1611 .id = AB8540_LDO_AUX6,
1617 .owner = THIS_MODULE, 1612 .owner = THIS_MODULE,
1618 .n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages), 1613 .n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1614 .volt_table = ldo_vaux56_ab8540_voltages,
1619 }, 1615 },
1620 .load_lp_uA = 20000, 1616 .load_lp_uA = 20000,
1621 /* values for Vaux6Regu register */ 1617 /* values for Vaux6Regu register */
@@ -1629,8 +1625,6 @@ static struct ab8500_regulator_info
1629 .voltage_bank = 0x04, 1625 .voltage_bank = 0x04,
1630 .voltage_reg = 0x36, 1626 .voltage_reg = 0x36,
1631 .voltage_mask = 0x3f, 1627 .voltage_mask = 0x3f,
1632 .voltages = ldo_vaux56_ab8540_voltages,
1633 .voltages_len = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1634 }, 1628 },
1635 [AB8540_LDO_INTCORE] = { 1629 [AB8540_LDO_INTCORE] = {
1636 .desc = { 1630 .desc = {
@@ -1743,6 +1737,7 @@ static struct ab8500_regulator_info
1743 .id = AB8540_LDO_DMIC, 1737 .id = AB8540_LDO_DMIC,
1744 .owner = THIS_MODULE, 1738 .owner = THIS_MODULE,
1745 .n_voltages = ARRAY_SIZE(ldo_vdmic_voltages), 1739 .n_voltages = ARRAY_SIZE(ldo_vdmic_voltages),
1740 .volt_table = ldo_vdmic_voltages,
1746 }, 1741 },
1747 .load_lp_uA = 1000, 1742 .load_lp_uA = 1000,
1748 .update_bank = 0x03, 1743 .update_bank = 0x03,
@@ -1752,8 +1747,6 @@ static struct ab8500_regulator_info
1752 .voltage_bank = 0x03, 1747 .voltage_bank = 0x03,
1753 .voltage_reg = 0x83, 1748 .voltage_reg = 0x83,
1754 .voltage_mask = 0xc0, 1749 .voltage_mask = 0xc0,
1755 .voltages = ldo_vdmic_voltages,
1756 .voltages_len = ARRAY_SIZE(ldo_vdmic_voltages),
1757 }, 1750 },
1758 1751
1759 /* 1752 /*