Skip to content

Commit

Permalink
Merge tag 'regulator-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A few small driver specific fixes for v5.18, plus an update to the
  MAINTAINERS file"

* tag 'regulator-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  MAINTAINERS: Fix reviewer info for a few ROHM ICs
  regulator: atc260x: Fix missing active_discharge_on setting
  regulator: rtq2134: Fix missing active_discharge_on setting
  regulator: wm8994: Add an off-on delay for WM8994 variant
  • Loading branch information
Linus Torvalds committed Apr 8, 2022
2 parents 0ccab01 + 908b768 commit 9884976
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 10 deletions.
12 changes: 5 additions & 7 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5715,7 +5715,7 @@ W: http://lanana.org/docs/device-list/index.html

DEVICE RESOURCE MANAGEMENT HELPERS
M: Hans de Goede <hdegoede@redhat.com>
R: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
R: Matti Vaittinen <mazziesaccount@gmail.com>
S: Maintained
F: include/linux/devm-helpers.h

Expand Down Expand Up @@ -11208,7 +11208,7 @@ F: scripts/spdxcheck.py

LINEAR RANGES HELPERS
M: Mark Brown <broonie@kernel.org>
R: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
R: Matti Vaittinen <mazziesaccount@gmail.com>
F: lib/linear_ranges.c
F: lib/test_linear_ranges.c
F: include/linux/linear_range.h
Expand Down Expand Up @@ -17011,8 +17011,7 @@ S: Odd Fixes
F: drivers/tty/serial/rp2.*

ROHM BD99954 CHARGER IC
R: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
L: linux-power@fi.rohmeurope.com
R: Matti Vaittinen <mazziesaccount@gmail.com>
S: Supported
F: drivers/power/supply/bd99954-charger.c
F: drivers/power/supply/bd99954-charger.h
Expand All @@ -17035,8 +17034,7 @@ F: drivers/regulator/bd9571mwv-regulator.c
F: include/linux/mfd/bd9571mwv.h

ROHM POWER MANAGEMENT IC DEVICE DRIVERS
R: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
L: linux-power@fi.rohmeurope.com
R: Matti Vaittinen <mazziesaccount@gmail.com>
S: Supported
F: drivers/clk/clk-bd718x7.c
F: drivers/gpio/gpio-bd71815.c
Expand Down Expand Up @@ -21118,7 +21116,7 @@ F: include/linux/regulator/
K: regulator_get_optional

VOLTAGE AND CURRENT REGULATOR IRQ HELPERS
R: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
R: Matti Vaittinen <mazziesaccount@gmail.com>
F: drivers/regulator/irq_helpers.c

VRF
Expand Down
1 change: 1 addition & 0 deletions drivers/regulator/atc260x-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ enum atc2603c_reg_ids {
.bypass_mask = BIT(5), \
.active_discharge_reg = ATC2603C_PMU_SWITCH_CTL, \
.active_discharge_mask = BIT(1), \
.active_discharge_on = BIT(1), \
.owner = THIS_MODULE, \
}

Expand Down
1 change: 1 addition & 0 deletions drivers/regulator/rtq2134-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ static const unsigned int rtq2134_buck_ramp_delay_table[] = {
.enable_mask = RTQ2134_VOUTEN_MASK, \
.active_discharge_reg = RTQ2134_REG_BUCK##_id##_CFG0, \
.active_discharge_mask = RTQ2134_ACTDISCHG_MASK, \
.active_discharge_on = RTQ2134_ACTDISCHG_MASK, \
.ramp_reg = RTQ2134_REG_BUCK##_id##_RSPCFG, \
.ramp_mask = RTQ2134_RSPUP_MASK, \
.ramp_delay_table = rtq2134_buck_ramp_delay_table, \
Expand Down
42 changes: 39 additions & 3 deletions drivers/regulator/wm8994-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,35 @@ static const struct regulator_ops wm8994_ldo2_ops = {
};

static const struct regulator_desc wm8994_ldo_desc[] = {
{
.name = "LDO1",
.id = 1,
.type = REGULATOR_VOLTAGE,
.n_voltages = WM8994_LDO1_MAX_SELECTOR + 1,
.vsel_reg = WM8994_LDO_1,
.vsel_mask = WM8994_LDO1_VSEL_MASK,
.ops = &wm8994_ldo1_ops,
.min_uV = 2400000,
.uV_step = 100000,
.enable_time = 3000,
.off_on_delay = 36000,
.owner = THIS_MODULE,
},
{
.name = "LDO2",
.id = 2,
.type = REGULATOR_VOLTAGE,
.n_voltages = WM8994_LDO2_MAX_SELECTOR + 1,
.vsel_reg = WM8994_LDO_2,
.vsel_mask = WM8994_LDO2_VSEL_MASK,
.ops = &wm8994_ldo2_ops,
.enable_time = 3000,
.off_on_delay = 36000,
.owner = THIS_MODULE,
},
};

static const struct regulator_desc wm8958_ldo_desc[] = {
{
.name = "LDO1",
.id = 1,
Expand Down Expand Up @@ -172,9 +201,16 @@ static int wm8994_ldo_probe(struct platform_device *pdev)
* regulator core and we need not worry about it on the
* error path.
*/
ldo->regulator = devm_regulator_register(&pdev->dev,
&wm8994_ldo_desc[id],
&config);
if (ldo->wm8994->type == WM8994) {
ldo->regulator = devm_regulator_register(&pdev->dev,
&wm8994_ldo_desc[id],
&config);
} else {
ldo->regulator = devm_regulator_register(&pdev->dev,
&wm8958_ldo_desc[id],
&config);
}

if (IS_ERR(ldo->regulator)) {
ret = PTR_ERR(ldo->regulator);
dev_err(wm8994->dev, "Failed to register LDO%d: %d\n",
Expand Down

0 comments on commit 9884976

Please sign in to comment.