Commit df532d54 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'regulator-v3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "Quite a few fixes here, mostly small driver specific ones.

  The stand out thing is a fix for errors generating the documentation
  from Randy Dunlap, otherwise unless you're using the driver in
  question there should be no impact"

* tag 'regulator-v3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: ti-abb: Fix bias voltage glitch in transition to bypass mode
  regulator: wm831x-ldo: Fix max_uV for gp_ldo and aldo linear range settings
  regulator: wm8350: correct the max_uV of LDO
  regulator: fix fatal kernel-doc error
  regulator: palmas: Remove wrong comment for the equation calculating num_voltages
  regulator: da9063: Fix PTR_ERR/ERR_PTR mismatch
  regulator: palmas: configure enable time for LDOs
  regulator: palmas: fix the n_voltages for smps to 122
parents b822cb18 f3d17a7e
......@@ -709,7 +709,7 @@ static struct da9063_regulators_pdata *da9063_parse_regulators_dt(
struct of_regulator_match **da9063_reg_matches)
{
da9063_reg_matches = NULL;
return PTR_ERR(-ENODEV);
return ERR_PTR(-ENODEV);
}
#endif
......
......@@ -201,13 +201,7 @@ static unsigned int palmas_smps_ramp_delay[4] = {0, 10000, 5000, 2500};
#define SMPS_CTRL_MODE_ECO 0x02
#define SMPS_CTRL_MODE_PWM 0x03
/* These values are derived from the data sheet. And are the number of steps
* where there is a voltage change, the ranges at beginning and end of register
* max/min values where there are no change are ommitted.
*
* So they are basically (maxV-minV)/stepV
*/
#define PALMAS_SMPS_NUM_VOLTAGES 117
#define PALMAS_SMPS_NUM_VOLTAGES 122
#define PALMAS_SMPS10_NUM_VOLTAGES 2
#define PALMAS_LDO_NUM_VOLTAGES 50
......@@ -979,6 +973,7 @@ static int palmas_regulators_probe(struct platform_device *pdev)
pmic->desc[id].min_uV = 900000;
pmic->desc[id].uV_step = 50000;
pmic->desc[id].linear_min_sel = 1;
pmic->desc[id].enable_time = 500;
pmic->desc[id].vsel_reg =
PALMAS_BASE_TO_REG(PALMAS_LDO_BASE,
palmas_regs_info[id].vsel_addr);
......@@ -997,6 +992,11 @@ static int palmas_regulators_probe(struct platform_device *pdev)
pmic->desc[id].min_uV = 450000;
pmic->desc[id].uV_step = 25000;
}
/* LOD6 in vibrator mode will have enable time 2000us */
if (pdata && pdata->ldo6_vibrator &&
(id == PALMAS_REG_LDO6))
pmic->desc[id].enable_time = 2000;
} else {
pmic->desc[id].n_voltages = 1;
pmic->desc[id].ops = &palmas_ops_extreg;
......
......@@ -279,8 +279,12 @@ static int ti_abb_set_opp(struct regulator_dev *rdev, struct ti_abb *abb,
ti_abb_rmw(regs->opp_sel_mask, info->opp_sel, regs->control_reg,
abb->base);
/* program LDO VBB vset override if needed */
if (abb->ldo_base)
/*
* program LDO VBB vset override if needed for !bypass mode
* XXX: Do not switch sequence - for !bypass, LDO override reset *must*
* be performed *before* switch to bias mode else VBB glitches.
*/
if (abb->ldo_base && info->opp_sel != TI_ABB_NOMINAL_OPP)
ti_abb_program_ldovbb(dev, abb, info);
/* Initiate ABB ldo change */
......@@ -295,6 +299,14 @@ static int ti_abb_set_opp(struct regulator_dev *rdev, struct ti_abb *abb,
if (ret)
goto out;
/*
* Reset LDO VBB vset override bypass mode
* XXX: Do not switch sequence - for bypass, LDO override reset *must*
* be performed *after* switch to bypass else VBB glitches.
*/
if (abb->ldo_base && info->opp_sel == TI_ABB_NOMINAL_OPP)
ti_abb_program_ldovbb(dev, abb, info);
out:
return ret;
}
......
......@@ -63,7 +63,7 @@ static irqreturn_t wm831x_ldo_uv_irq(int irq, void *data)
*/
static const struct regulator_linear_range wm831x_gp_ldo_ranges[] = {
{ .min_uV = 900000, .max_uV = 1650000, .min_sel = 0, .max_sel = 14,
{ .min_uV = 900000, .max_uV = 1600000, .min_sel = 0, .max_sel = 14,
.uV_step = 50000 },
{ .min_uV = 1700000, .max_uV = 3300000, .min_sel = 15, .max_sel = 31,
.uV_step = 100000 },
......@@ -332,7 +332,7 @@ static struct platform_driver wm831x_gp_ldo_driver = {
*/
static const struct regulator_linear_range wm831x_aldo_ranges[] = {
{ .min_uV = 1000000, .max_uV = 1650000, .min_sel = 0, .max_sel = 12,
{ .min_uV = 1000000, .max_uV = 1600000, .min_sel = 0, .max_sel = 12,
.uV_step = 50000 },
{ .min_uV = 1700000, .max_uV = 3500000, .min_sel = 13, .max_sel = 31,
.uV_step = 100000 },
......
......@@ -543,7 +543,7 @@ static int wm8350_dcdc_set_suspend_mode(struct regulator_dev *rdev,
}
static const struct regulator_linear_range wm8350_ldo_ranges[] = {
{ .min_uV = 900000, .max_uV = 1750000, .min_sel = 0, .max_sel = 15,
{ .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 },
......
......@@ -40,6 +40,8 @@ enum regulator_status {
};
/**
* struct regulator_linear_range - specify linear voltage ranges
*
* Specify a range of voltages for regulator_map_linar_range() and
* regulator_list_linear_range().
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment