aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhenhua HUANG <zhenhua.huang@stericsson.com>2013-04-02 08:24:15 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-03 13:40:26 -0400
commit684d5ce4afafddb2ad08f36ea30ca7d7adc88ebe (patch)
tree1a4f372b345f59ee9250a0088ca3092487fba23e
parent33aeb49e247ff6b0d51301b92681a304f097c263 (diff)
regulator: ab8500: Introduce aux5, aux6 regulators for AB8540
Introduce aux5, aux6 into ab8540 regulator framework. Signed-off-by: Zhenhua HUANG <zhenhua.huang@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Maxime COQUELIN <maxime.coquelin@stericsson.com> Reviewed-by: David PARIS <david.paris@stericsson.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--drivers/regulator/ab8500.c65
-rw-r--r--include/linux/regulator/ab8500.h2
2 files changed, 67 insertions, 0 deletions
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 9cb634807ff8..433cac4396df 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -149,6 +149,21 @@ static const unsigned int ldo_vaux3_ab8540_voltages[] = {
149 3050000, 149 3050000,
150}; 150};
151 151
152static const unsigned int ldo_vaux56_ab8540_voltages[] = {
153 750000, 760000, 770000, 780000, 790000, 800000,
154 810000, 820000, 830000, 840000, 850000, 860000,
155 870000, 880000, 890000, 900000, 910000, 920000,
156 930000, 940000, 950000, 960000, 970000, 980000,
157 990000, 1000000, 1010000, 1020000, 1030000,
158 1040000, 1050000, 1060000, 1070000, 1080000,
159 1090000, 1100000, 1110000, 1120000, 1130000,
160 1140000, 1150000, 1160000, 1170000, 1180000,
161 1190000, 1200000, 1210000, 1220000, 1230000,
162 1240000, 1250000, 1260000, 1270000, 1280000,
163 1290000, 1300000, 1310000, 1320000, 1330000,
164 1340000, 1350000, 1360000, 1800000, 2790000,
165};
166
152static const unsigned int ldo_vintcore_voltages[] = { 167static const unsigned int ldo_vintcore_voltages[] = {
153 1200000, 168 1200000,
154 1225000, 169 1225000,
@@ -1569,6 +1584,54 @@ static struct ab8500_regulator_info
1569 .voltage_reg = 0x2f, 1584 .voltage_reg = 0x2f,
1570 .voltage_mask = 0x0f, 1585 .voltage_mask = 0x0f,
1571 }, 1586 },
1587 [AB8540_LDO_AUX5] = {
1588 .desc = {
1589 .name = "LDO-AUX5",
1590 .ops = &ab8500_regulator_volt_mode_ops,
1591 .type = REGULATOR_VOLTAGE,
1592 .id = AB8540_LDO_AUX5,
1593 .owner = THIS_MODULE,
1594 .n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1595 },
1596 .load_lp_uA = 20000,
1597 /* values for Vaux5Regu register */
1598 .update_bank = 0x04,
1599 .update_reg = 0x32,
1600 .update_mask = 0x03,
1601 .update_val = 0x01,
1602 .update_val_idle = 0x03,
1603 .update_val_normal = 0x01,
1604 /* values for Vaux5SEL register */
1605 .voltage_bank = 0x04,
1606 .voltage_reg = 0x33,
1607 .voltage_mask = 0x3f,
1608 .voltages = ldo_vaux56_ab8540_voltages,
1609 .voltages_len = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1610 },
1611 [AB8540_LDO_AUX6] = {
1612 .desc = {
1613 .name = "LDO-AUX6",
1614 .ops = &ab8500_regulator_volt_mode_ops,
1615 .type = REGULATOR_VOLTAGE,
1616 .id = AB8540_LDO_AUX6,
1617 .owner = THIS_MODULE,
1618 .n_voltages = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1619 },
1620 .load_lp_uA = 20000,
1621 /* values for Vaux6Regu register */
1622 .update_bank = 0x04,
1623 .update_reg = 0x35,
1624 .update_mask = 0x03,
1625 .update_val = 0x01,
1626 .update_val_idle = 0x03,
1627 .update_val_normal = 0x01,
1628 /* values for Vaux6SEL register */
1629 .voltage_bank = 0x04,
1630 .voltage_reg = 0x36,
1631 .voltage_mask = 0x3f,
1632 .voltages = ldo_vaux56_ab8540_voltages,
1633 .voltages_len = ARRAY_SIZE(ldo_vaux56_ab8540_voltages),
1634 },
1572 [AB8540_LDO_INTCORE] = { 1635 [AB8540_LDO_INTCORE] = {
1573 .desc = { 1636 .desc = {
1574 .name = "LDO-INTCORE", 1637 .name = "LDO-INTCORE",
@@ -2979,6 +3042,8 @@ static struct of_regulator_match ab8540_regulator_match[] = {
2979 { .name = "ab8500_ldo_aux2", .driver_data = (void *) AB8540_LDO_AUX2, }, 3042 { .name = "ab8500_ldo_aux2", .driver_data = (void *) AB8540_LDO_AUX2, },
2980 { .name = "ab8500_ldo_aux3", .driver_data = (void *) AB8540_LDO_AUX3, }, 3043 { .name = "ab8500_ldo_aux3", .driver_data = (void *) AB8540_LDO_AUX3, },
2981 { .name = "ab8500_ldo_aux4", .driver_data = (void *) AB8540_LDO_AUX4, }, 3044 { .name = "ab8500_ldo_aux4", .driver_data = (void *) AB8540_LDO_AUX4, },
3045 { .name = "ab8500_ldo_aux5", .driver_data = (void *) AB8540_LDO_AUX5, },
3046 { .name = "ab8500_ldo_aux6", .driver_data = (void *) AB8540_LDO_AUX6, },
2982 { .name = "ab8500_ldo_intcore", .driver_data = (void *) AB8540_LDO_INTCORE, }, 3047 { .name = "ab8500_ldo_intcore", .driver_data = (void *) AB8540_LDO_INTCORE, },
2983 { .name = "ab8500_ldo_tvout", .driver_data = (void *) AB8540_LDO_TVOUT, }, 3048 { .name = "ab8500_ldo_tvout", .driver_data = (void *) AB8540_LDO_TVOUT, },
2984 { .name = "ab8500_ldo_audio", .driver_data = (void *) AB8540_LDO_AUDIO, }, 3049 { .name = "ab8500_ldo_audio", .driver_data = (void *) AB8540_LDO_AUDIO, },
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h
index 44f67e8f1a6d..90b8b5ae9a4e 100644
--- a/include/linux/regulator/ab8500.h
+++ b/include/linux/regulator/ab8500.h
@@ -74,6 +74,8 @@ enum ab8540_regulator_id {
74 AB8540_LDO_AUX2, 74 AB8540_LDO_AUX2,
75 AB8540_LDO_AUX3, 75 AB8540_LDO_AUX3,
76 AB8540_LDO_AUX4, 76 AB8540_LDO_AUX4,
77 AB8540_LDO_AUX5,
78 AB8540_LDO_AUX6,
77 AB8540_LDO_INTCORE, 79 AB8540_LDO_INTCORE,
78 AB8540_LDO_TVOUT, 80 AB8540_LDO_TVOUT,
79 AB8540_LDO_AUDIO, 81 AB8540_LDO_AUDIO,