aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-23 13:48:57 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-23 13:48:57 -0500
commit68aaa37d0e8232d62a7e9411699e0dc005750186 (patch)
tree9bb05a5057574e506d5e75bd1b4bf9e39593d7ef /drivers/regulator
parent4c78899b92335af0da11e104698e329bb50810b5 (diff)
parent780dc9ba4eb682a89be48d5b814feae6722a19e0 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-next
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/tps65910-regulator.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index a620e25c85c4..bb2a08d4e93e 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -640,10 +640,10 @@ static int tps65910_set_voltage_dcdc(struct regulator_dev *dev,
640 640
641 switch (id) { 641 switch (id) {
642 case TPS65910_REG_VDD1: 642 case TPS65910_REG_VDD1:
643 dcdc_mult = (selector / VDD1_2_NUM_VOLTS) + 1; 643 dcdc_mult = (selector / VDD1_2_NUM_VOLT_FINE) + 1;
644 if (dcdc_mult == 1) 644 if (dcdc_mult == 1)
645 dcdc_mult--; 645 dcdc_mult--;
646 vsel = (selector % VDD1_2_NUM_VOLTS) + 3; 646 vsel = (selector % VDD1_2_NUM_VOLT_FINE) + 3;
647 647
648 tps65910_modify_bits(pmic, TPS65910_VDD1, 648 tps65910_modify_bits(pmic, TPS65910_VDD1,
649 (dcdc_mult << VDD1_VGAIN_SEL_SHIFT), 649 (dcdc_mult << VDD1_VGAIN_SEL_SHIFT),
@@ -651,10 +651,10 @@ static int tps65910_set_voltage_dcdc(struct regulator_dev *dev,
651 tps65910_reg_write(pmic, TPS65910_VDD1_OP, vsel); 651 tps65910_reg_write(pmic, TPS65910_VDD1_OP, vsel);
652 break; 652 break;
653 case TPS65910_REG_VDD2: 653 case TPS65910_REG_VDD2:
654 dcdc_mult = (selector / VDD1_2_NUM_VOLTS) + 1; 654 dcdc_mult = (selector / VDD1_2_NUM_VOLT_FINE) + 1;
655 if (dcdc_mult == 1) 655 if (dcdc_mult == 1)
656 dcdc_mult--; 656 dcdc_mult--;
657 vsel = (selector % VDD1_2_NUM_VOLTS) + 3; 657 vsel = (selector % VDD1_2_NUM_VOLT_FINE) + 3;
658 658
659 tps65910_modify_bits(pmic, TPS65910_VDD2, 659 tps65910_modify_bits(pmic, TPS65910_VDD2,
660 (dcdc_mult << VDD2_VGAIN_SEL_SHIFT), 660 (dcdc_mult << VDD2_VGAIN_SEL_SHIFT),
@@ -732,9 +732,9 @@ static int tps65910_list_voltage_dcdc(struct regulator_dev *dev,
732 switch (id) { 732 switch (id) {
733 case TPS65910_REG_VDD1: 733 case TPS65910_REG_VDD1:
734 case TPS65910_REG_VDD2: 734 case TPS65910_REG_VDD2:
735 mult = (selector / VDD1_2_NUM_VOLTS) + 1; 735 mult = (selector / VDD1_2_NUM_VOLT_FINE) + 1;
736 volt = VDD1_2_MIN_VOLT + 736 volt = VDD1_2_MIN_VOLT +
737 (selector % VDD1_2_NUM_VOLTS) * VDD1_2_OFFSET; 737 (selector % VDD1_2_NUM_VOLT_FINE) * VDD1_2_OFFSET;
738 break; 738 break;
739 case TPS65911_REG_VDDCTRL: 739 case TPS65911_REG_VDDCTRL:
740 volt = VDDCTRL_MIN_VOLT + (selector * VDDCTRL_OFFSET); 740 volt = VDDCTRL_MIN_VOLT + (selector * VDDCTRL_OFFSET);
@@ -930,6 +930,8 @@ static __devinit int tps65910_probe(struct platform_device *pdev)
930 930
931 if (i == TPS65910_REG_VDD1 || i == TPS65910_REG_VDD2) { 931 if (i == TPS65910_REG_VDD1 || i == TPS65910_REG_VDD2) {
932 pmic->desc[i].ops = &tps65910_ops_dcdc; 932 pmic->desc[i].ops = &tps65910_ops_dcdc;
933 pmic->desc[i].n_voltages = VDD1_2_NUM_VOLT_FINE *
934 VDD1_2_NUM_VOLT_COARSE;
933 } else if (i == TPS65910_REG_VDD3) { 935 } else if (i == TPS65910_REG_VDD3) {
934 if (tps65910_chip_id(tps65910) == TPS65910) 936 if (tps65910_chip_id(tps65910) == TPS65910)
935 pmic->desc[i].ops = &tps65910_ops_vdd3; 937 pmic->desc[i].ops = &tps65910_ops_vdd3;