Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302269
b: refs/heads/master
c: d31e954
h: refs/heads/master
i:
  302267: 8b464a5
v: v3
  • Loading branch information
Mark Brown committed May 12, 2012
1 parent 4d1e4e1 commit 501f224
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 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: bca7bbfff37808d56355bbcf0ceec34f0cc6c85d
refs/heads/master: d31e954e07c838f44183addeecc7115d25e83266
15 changes: 4 additions & 11 deletions trunk/drivers/regulator/wm831x-ldo.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,15 +626,6 @@ static struct platform_driver wm831x_aldo_driver = {

#define WM831X_ALIVE_LDO_MAX_SELECTOR 0xf

static int wm831x_alive_ldo_list_voltage(struct regulator_dev *rdev,
unsigned int selector)
{
/* 0.8-1.55V in 50mV steps */
if (selector <= WM831X_ALIVE_LDO_MAX_SELECTOR)
return 800000 + (selector * 50000);
return -EINVAL;
}

static int wm831x_alive_ldo_set_voltage_int(struct regulator_dev *rdev,
int reg,
int min_uV, int max_uV,
Expand All @@ -646,7 +637,7 @@ static int wm831x_alive_ldo_set_voltage_int(struct regulator_dev *rdev,

vsel = (min_uV - 800000) / 50000;

ret = wm831x_alive_ldo_list_voltage(rdev, vsel);
ret = regulator_list_voltage_linear(rdev, vsel);
if (ret < 0)
return ret;
if (ret < min_uV || ret > max_uV)
Expand Down Expand Up @@ -696,7 +687,7 @@ static int wm831x_alive_ldo_get_status(struct regulator_dev *rdev)
}

static struct regulator_ops wm831x_alive_ldo_ops = {
.list_voltage = wm831x_alive_ldo_list_voltage,
.list_voltage = regulator_list_voltage_linear,
.get_voltage_sel = regulator_get_voltage_sel_regmap,
.set_voltage = wm831x_alive_ldo_set_voltage,
.set_suspend_voltage = wm831x_alive_ldo_set_suspend_voltage,
Expand Down Expand Up @@ -758,6 +749,8 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
ldo->desc.vsel_mask = WM831X_LDO11_ON_VSEL_MASK;
ldo->desc.enable_reg = WM831X_LDO_ENABLE;
ldo->desc.enable_mask = 1 << id;
ldo->desc.min_uV = 800000;
ldo->desc.uV_step = 50000;

config.dev = pdev->dev.parent;
if (pdata)
Expand Down

0 comments on commit 501f224

Please sign in to comment.