* [PATCH] regulator: tps65219: use generic set_bypass()
@ 2023-02-03 14:01 Jerome Neanne
2023-02-03 17:43 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jerome Neanne @ 2023-02-03 14:01 UTC (permalink / raw)
To: tony, lgirdwood, broonie
Cc: linux-omap, linux-kernel, khilman, nm, msp, Jerome Neanne
Due to wrong interpretation of the specification,
custom implementation was used instead of standard regmap helper.
LINK: https://lore.kernel.org/all/c2014039-f1e8-6976-33d6-52e2dd4e7b66@baylibre.com/
Fixes: c12ac5fc3e0a ("regulator: drivers: Add TI TPS65219 PMIC regulators support")
Regulator does NOT require to be off to be switched to bypass mode.
Signed-off-by: Jerome Neanne <jneanne@baylibre.com>
---
drivers/regulator/tps65219-regulator.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c
index 070159cb5f09..58f6541b6417 100644
--- a/drivers/regulator/tps65219-regulator.c
+++ b/drivers/regulator/tps65219-regulator.c
@@ -173,24 +173,6 @@ static unsigned int tps65219_get_mode(struct regulator_dev *dev)
return REGULATOR_MODE_NORMAL;
}
-/*
- * generic regulator_set_bypass_regmap does not fully match requirements
- * TPS65219 Requires explicitly that regulator is disabled before switch
- */
-static int tps65219_set_bypass(struct regulator_dev *dev, bool enable)
-{
- struct tps65219 *tps = rdev_get_drvdata(dev);
- unsigned int rid = rdev_get_id(dev);
-
- if (dev->desc->ops->is_enabled(dev)) {
- dev_err(tps->dev,
- "%s LDO%d enabled, must be shut down to set bypass ",
- __func__, rid);
- return -EBUSY;
- }
- return regulator_set_bypass_regmap(dev, enable);
-}
-
/* Operations permitted on BUCK1/2/3 */
static const struct regulator_ops tps65219_bucks_ops = {
.is_enabled = regulator_is_enabled_regmap,
@@ -217,7 +199,7 @@ static const struct regulator_ops tps65219_ldos_1_2_ops = {
.set_voltage_sel = regulator_set_voltage_sel_regmap,
.list_voltage = regulator_list_voltage_linear_range,
.map_voltage = regulator_map_voltage_linear_range,
- .set_bypass = tps65219_set_bypass,
+ .set_bypass = regulator_set_bypass_regmap,
.get_bypass = regulator_get_bypass_regmap,
};
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] regulator: tps65219: use generic set_bypass()
2023-02-03 14:01 [PATCH] regulator: tps65219: use generic set_bypass() Jerome Neanne
@ 2023-02-03 17:43 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-02-03 17:43 UTC (permalink / raw)
To: tony, lgirdwood, Jerome Neanne; +Cc: linux-omap, linux-kernel, khilman, nm, msp
On Fri, 03 Feb 2023 15:01:19 +0100, Jerome Neanne wrote:
> Due to wrong interpretation of the specification,
> custom implementation was used instead of standard regmap helper.
> LINK: https://lore.kernel.org/all/c2014039-f1e8-6976-33d6-52e2dd4e7b66@baylibre.com/
>
> Fixes: c12ac5fc3e0a ("regulator: drivers: Add TI TPS65219 PMIC regulators support")
>
> Regulator does NOT require to be off to be switched to bypass mode.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: tps65219: use generic set_bypass()
commit: 0365df81145a4cfaae5f4da896160de512256e6d
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-03 17:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 14:01 [PATCH] regulator: tps65219: use generic set_bypass() Jerome Neanne
2023-02-03 17:43 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®