Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323331
b: refs/heads/master
c: c42ea5c
h: refs/heads/master
i:
  323329: 1f4f4ec
  323327: cf682e1
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Aug 28, 2012
1 parent 06d70a0 commit f1162ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 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: 74c8cfdaa6865a6d47018d2d0606a6fd0053812f
refs/heads/master: c42ea5cdfb14418a9d81e7192d65196b2785c3c2
25 changes: 3 additions & 22 deletions trunk/drivers/regulator/lp8788-buck.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,27 +459,6 @@ static struct regulator_desc lp8788_buck_desc[] = {
},
};

static int lp8788_set_default_dvs_ctrl_mode(struct lp8788 *lp,
enum lp8788_buck_id id)
{
u8 mask, val;

switch (id) {
case BUCK1:
mask = LP8788_BUCK1_DVS_SEL_M;
val = LP8788_BUCK1_DVS_I2C;
break;
case BUCK2:
mask = LP8788_BUCK2_DVS_SEL_M;
val = LP8788_BUCK2_DVS_I2C;
break;
default:
return 0;
}

return lp8788_update_bits(lp, LP8788_BUCK_DVS_SEL, mask, val);
}

static int _gpio_request(struct lp8788_buck *buck, int gpio, char *name)
{
struct device *dev = buck->lp->dev;
Expand Down Expand Up @@ -530,6 +509,7 @@ static int lp8788_init_dvs(struct lp8788_buck *buck, enum lp8788_buck_id id)
struct lp8788_platform_data *pdata = buck->lp->pdata;
u8 mask[] = { LP8788_BUCK1_DVS_SEL_M, LP8788_BUCK2_DVS_SEL_M };
u8 val[] = { LP8788_BUCK1_DVS_PIN, LP8788_BUCK2_DVS_PIN };
u8 default_dvs_mode[] = { LP8788_BUCK1_DVS_I2C, LP8788_BUCK2_DVS_I2C };

/* no dvs for buck3, 4 */
if (id == BUCK3 || id == BUCK4)
Expand All @@ -550,7 +530,8 @@ static int lp8788_init_dvs(struct lp8788_buck *buck, enum lp8788_buck_id id)
val[id]);

set_default_dvs_mode:
return lp8788_set_default_dvs_ctrl_mode(buck->lp, id);
return lp8788_update_bits(buck->lp, LP8788_BUCK_DVS_SEL, mask[id],
default_dvs_mode[id]);
}

static __devinit int lp8788_buck_probe(struct platform_device *pdev)
Expand Down

0 comments on commit f1162ee

Please sign in to comment.