Skip to contentSkip to conversation

Fix rt4831 regulator active_discharge and bypass

PATCH In review cy_huang 2 participants 4 messages Mar 25, 2022 Voltage and current regulator framework

lore
Share & tools
lore

cy_huang

author
#0 lore raw

cover Fix rt4831 regulator active_discharge and bypass

From: ChiYuan Huang <[email protected]>

This patch series is to fix rt4831 regulator set/get active_discharge and bypass

ChiYuan Huang (2):
regulator: rt4831: Add bypass mask to fix set_bypass API work
regulator: rt4831: Add active_discharge_on to fix discharge API

 drivers/regulator/rt4831-regulator.c | 3 +++
 1 file changed, 3 insertions(+)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/2 regulator: rt4831: Add bypass mask to fix set_bypass API work

From: ChiYuan Huang <[email protected]>

To use set/get_bypass helper function, bypass mask need to be specified.

---
 drivers/regulator/rt4831-regulator.c | 1 +
 1 file changed, 1 insertion(+)
drivers/regulator/rt4831-regulator.c +1 -0
index 676b041..8d24b5f 100644
@@ -106,6 +106,7 @@ static const struct regulator_desc rt4831_regulator_descs[] = {
 		.vsel_reg = RT4831_REG_VLCM,
 		.vsel_mask = RT4831_VOLT_MASK,
 		.bypass_reg = RT4831_REG_DSVEN,
+		.bypass_mask = RT4831_DSVMODE_MASK,
 		.bypass_val_on = DSV_MODE_BYPASS,
 		.bypass_val_off = DSV_MODE_NORMAL,
 		.owner = THIS_MODULE,
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 2/2 regulator: rt4831: Add active_discharge_on to fix discharge API

In reply to cy_huang

From: ChiYuan Huang <[email protected]>

To use set_discharge helper function, active_discharge_on need to be added.

---
 drivers/regulator/rt4831-regulator.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/regulator/rt4831-regulator.c +2 -0
index 8d24b5f..2016062 100644
@@ -127,6 +127,7 @@ static const struct regulator_desc rt4831_regulator_descs[] = {
 		.enable_mask = RT4831_POSEN_MASK,
 		.active_discharge_reg = RT4831_REG_DSVEN,
 		.active_discharge_mask = RT4831_POSADEN_MASK,
+		.active_discharge_on = RT4831_POSADEN_MASK,
 		.owner = THIS_MODULE,
 	},
 	{
@@ -145,6 +146,7 @@ static const struct regulator_desc rt4831_regulator_descs[] = {
 		.enable_mask = RT4831_NEGEN_MASK,
 		.active_discharge_reg = RT4831_REG_DSVEN,
 		.active_discharge_mask = RT4831_NEGADEN_MASK,
+		.active_discharge_on = RT4831_NEGADEN_MASK,
 		.owner = THIS_MODULE,
 	}
 };
Signature · 1 line
2.7.4
maintainer
#3 lore raw
In reply to cy_huang
Quoted 9 lines · cy_huang

From: ChiYuan Huang <[email protected]>

This patch series is to fix rt4831 regulator set/get active_discharge and bypass

ChiYuan Huang (2):
regulator: rt4831: Add bypass mask to fix set_bypass API work
regulator: rt4831: Add active_discharge_on to fix discharge API

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-linus

Thanks!

[1/2] regulator: rt4831: Add bypass mask to fix set_bypass API work

      commit: 184ae0e32bc990bba203b60503df89c9f8865f13
[2/2] regulator: rt4831: Add active_discharge_on to fix discharge API
      commit: aefe5fc3000a24869edbf7bb657adf28372ec158

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