Commit 7ee63bd7 authored by Keerthy's avatar Keerthy Committed by Lee Jones

regulator: lp87565: Add 4-phase lp87561 regulator support

The LP8756x family has a single output 4-phase regulator
configuration. Add support for the same. The control
lies in the master buck which is buck0 for 4-phase
configuration. Enable/disable/voltage set happen via
buck0 registers.

Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdfSigned-off-by: default avatarKeerthy <j-keerthy@ti.com>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 013e868b
...@@ -153,6 +153,12 @@ static const struct lp87565_regulator regulators[] = { ...@@ -153,6 +153,12 @@ static const struct lp87565_regulator regulators[] = {
LP87565_REG_BUCK2_CTRL_1, LP87565_REG_BUCK2_CTRL_1,
LP87565_BUCK_CTRL_1_EN, 3230, LP87565_BUCK_CTRL_1_EN, 3230,
buck0_1_2_3_ranges, LP87565_REG_BUCK2_CTRL_2), buck0_1_2_3_ranges, LP87565_REG_BUCK2_CTRL_2),
LP87565_REGULATOR("BUCK3210", LP87565_BUCK_3210, "buck3210",
lp87565_buck_ops, 256, LP87565_REG_BUCK0_VOUT,
LP87565_BUCK_VSET, LP87565_REG_BUCK0_CTRL_1,
LP87565_BUCK_CTRL_1_EN |
LP87565_BUCK_CTRL_1_FPWM_MP_0_2, 3230,
buck0_1_2_3_ranges, LP87565_REG_BUCK0_CTRL_2),
}; };
static int lp87565_regulator_probe(struct platform_device *pdev) static int lp87565_regulator_probe(struct platform_device *pdev)
...@@ -169,9 +175,18 @@ static int lp87565_regulator_probe(struct platform_device *pdev) ...@@ -169,9 +175,18 @@ static int lp87565_regulator_probe(struct platform_device *pdev)
config.driver_data = lp87565; config.driver_data = lp87565;
config.regmap = lp87565->regmap; config.regmap = lp87565->regmap;
if (lp87565->dev_type == LP87565_DEVICE_TYPE_LP87565_Q1) { switch (lp87565->dev_type) {
case LP87565_DEVICE_TYPE_LP87565_Q1:
min_idx = LP87565_BUCK_10; min_idx = LP87565_BUCK_10;
max_idx = LP87565_BUCK_23; max_idx = LP87565_BUCK_23;
break;
case LP87565_DEVICE_TYPE_LP87561_Q1:
min_idx = LP87565_BUCK_3210;
max_idx = LP87565_BUCK_3210;
default:
dev_err(lp87565->dev, "Invalid lp config %d\n",
lp87565->dev_type);
return -EINVAL;
} }
for (i = min_idx; i <= max_idx; i++) { for (i = min_idx; i <= max_idx; i++) {
......
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