Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312513
b: refs/heads/master
c: 74adfee
h: refs/heads/master
i:
  312511: 663a7a1
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Jun 4, 2012
1 parent 70ae696 commit b959664
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 0d032731178d78450296bdf0b27562476594c298
refs/heads/master: 74adfee53b8f05b4a9db0848d19399db2cef6cbf
13 changes: 7 additions & 6 deletions trunk/drivers/regulator/max77686.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,18 @@ static int max77686_set_dvs_voltage_time_sel(struct regulator_dev *rdev,
{
struct max77686_data *max77686 = rdev_get_drvdata(rdev);
int ramp_rate[] = {13, 27, 55, 100};
return (DIV_ROUND_UP(rdev->desc->uV_step
* abs(new_selector - old_selector),
ramp_rate[max77686->ramp_delay]));

return DIV_ROUND_UP(rdev->desc->uV_step *
abs(new_selector - old_selector),
ramp_rate[max77686->ramp_delay]);
}

static int max77686_set_voltage_time_sel(struct regulator_dev *rdev,
unsigned int old_selector, unsigned int new_selector)
{
/* Unconditionally 100 mV/us */
return (DIV_ROUND_UP(rdev->desc->uV_step
* abs(new_selector - old_selector), 100));
return DIV_ROUND_UP(rdev->desc->uV_step *
abs(new_selector - old_selector), 100);
}

static struct regulator_ops max77686_ops = {
Expand Down Expand Up @@ -171,7 +172,7 @@ static struct regulator_ops max77686_buck_dvs_ops = {
#define regulator_desc_buck_dvs(num) { \
.name = "BUCK"#num, \
.id = MAX77686_BUCK##num, \
.ops = &max77686_buck_dvs_ops, \
.ops = &max77686_buck_dvs_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.min_uV = MAX77686_DVS_MINUV, \
Expand Down

0 comments on commit b959664

Please sign in to comment.