diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /drivers/regulator/wm8350-regulator.c | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'drivers/regulator/wm8350-regulator.c')
-rw-r--r-- | drivers/regulator/wm8350-regulator.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index de7b9c7..61ca929 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c @@ -543,8 +543,10 @@ static int wm8350_dcdc_set_suspend_mode(struct regulator_dev *rdev, } static const struct regulator_linear_range wm8350_ldo_ranges[] = { - REGULATOR_LINEAR_RANGE(900000, 0, 15, 50000), - REGULATOR_LINEAR_RANGE(1800000, 16, 31, 100000), + { .min_uV = 900000, .max_uV = 1650000, .min_sel = 0, .max_sel = 15, + .uV_step = 50000 }, + { .min_uV = 1800000, .max_uV = 3300000, .min_sel = 16, .max_sel = 31, + .uV_step = 100000 }, }; static int wm8350_ldo_set_suspend_voltage(struct regulator_dev *rdev, int uV) @@ -1204,8 +1206,7 @@ static int wm8350_regulator_probe(struct platform_device *pdev) config.regmap = wm8350->regmap; /* register regulator */ - rdev = devm_regulator_register(&pdev->dev, &wm8350_reg[pdev->id], - &config); + rdev = regulator_register(&wm8350_reg[pdev->id], &config); if (IS_ERR(rdev)) { dev_err(&pdev->dev, "failed to register %s\n", wm8350_reg[pdev->id].name); @@ -1216,6 +1217,7 @@ static int wm8350_regulator_probe(struct platform_device *pdev) ret = wm8350_register_irq(wm8350, wm8350_reg[pdev->id].irq, pmic_uv_handler, 0, "UV", rdev); if (ret < 0) { + regulator_unregister(rdev); dev_err(&pdev->dev, "failed to register regulator %s IRQ\n", wm8350_reg[pdev->id].name); return ret; @@ -1231,6 +1233,8 @@ static int wm8350_regulator_remove(struct platform_device *pdev) wm8350_free_irq(wm8350, wm8350_reg[pdev->id].irq, rdev); + regulator_unregister(rdev); + return 0; } |