Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220624
b: refs/heads/master
c: 889cd5a
h: refs/heads/master
v: v3
  • Loading branch information
Lukasz Majewski authored and Samuel Ortiz committed Oct 28, 2010
1 parent b1ece32 commit c6d1737
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 509bd4764c110b89bb3d09a5b6621fd31dc58044
refs/heads/master: 889cd5a60f880e0a56b7b769d0b74eb222e6896c
10 changes: 8 additions & 2 deletions trunk/drivers/regulator/max8998.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ struct max8998_data {
struct max8998_dev *iodev;
int num_regulators;
struct regulator_dev **rdev;
u8 buck1_vol[4]; /* voltages for selection */
u8 buck2_vol[2];
unsigned int buck1_idx; /* index to last changed voltage */
/* value in a set */
unsigned int buck2_idx;
};

struct voltage_map_desc {
Expand Down Expand Up @@ -218,6 +223,7 @@ static int max8998_get_voltage_register(struct regulator_dev *rdev,
int *_reg, int *_shift, int *_mask)
{
int ldo = max8998_get_ldo(rdev);
struct max8998_data *max8998 = rdev_get_drvdata(rdev);
int reg, shift = 0, mask = 0xff;

switch (ldo) {
Expand Down Expand Up @@ -254,10 +260,10 @@ static int max8998_get_voltage_register(struct regulator_dev *rdev,
reg = MAX8998_REG_LDO12 + (ldo - MAX8998_LDO12);
break;
case MAX8998_BUCK1:
reg = MAX8998_REG_BUCK1_DVSARM1;
reg = MAX8998_REG_BUCK1_VOLTAGE1 + max8998->buck1_idx;
break;
case MAX8998_BUCK2:
reg = MAX8998_REG_BUCK2_DVSINT1;
reg = MAX8998_REG_BUCK2_VOLTAGE1 + max8998->buck2_idx;
break;
case MAX8998_BUCK3:
reg = MAX8998_REG_BUCK3;
Expand Down
12 changes: 6 additions & 6 deletions trunk/include/linux/mfd/max8998-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ enum {
MAX8998_REG_ONOFF2,
MAX8998_REG_ONOFF3,
MAX8998_REG_ONOFF4,
MAX8998_REG_BUCK1_DVSARM1,
MAX8998_REG_BUCK1_DVSARM2,
MAX8998_REG_BUCK1_DVSARM3,
MAX8998_REG_BUCK1_DVSARM4,
MAX8998_REG_BUCK2_DVSINT1,
MAX8998_REG_BUCK2_DVSINT2,
MAX8998_REG_BUCK1_VOLTAGE1,
MAX8998_REG_BUCK1_VOLTAGE2,
MAX8998_REG_BUCK1_VOLTAGE3,
MAX8998_REG_BUCK1_VOLTAGE4,
MAX8998_REG_BUCK2_VOLTAGE1,
MAX8998_REG_BUCK2_VOLTAGE2,
MAX8998_REG_BUCK3,
MAX8998_REG_BUCK4,
MAX8998_REG_LDO2_LDO3,
Expand Down

0 comments on commit c6d1737

Please sign in to comment.