Skip to contentSkip to conversation

regulator: sy8827n: make enable gpio NONEXCLUSIVE

PATCH In review Jisheng Zhang 3 participants 5 messages Jun 29, 2025 – Jul 8, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: sy8827n: make enable gpio NONEXCLUSIVE

On some platforms, the sy8827n enable gpio may also be used for other purpose, so make it NONEXCLUSIVE to support this case.

---
 drivers/regulator/sy8827n.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/regulator/sy8827n.c +2 -1
index f11ff38b36c9..0b811514782f 100644
@@ -140,7 +140,8 @@ static int sy8827n_i2c_probe(struct i2c_client *client)
 		return -EINVAL;
 	}
 
-	di->en_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_HIGH);
+	di->en_gpio = devm_gpiod_get_optional(dev, "enable",
+			GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE);
 	if (IS_ERR(di->en_gpio))
 		return PTR_ERR(di->en_gpio);
 
Signature · 1 line
2.49.0
Acked-by on v1 1/1
#1 lore raw
Quoted 24 lines · Jisheng Zhang

On some platforms, the sy8827n enable gpio may also be used for other purpose, so make it NONEXCLUSIVE to support this case.

---
 drivers/regulator/sy8827n.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/regulator/sy8827n.c +2 -2
index f11ff38b36c9..0b811514782f 100644
@@ -140,7 +140,8 @@ static int sy8827n_i2c_probe(struct i2c_client *client)
                return -EINVAL;
        }
 
-       di->en_gpio = devm_gpiod_get_optional(dev, "enable", GPIOD_OUT_HIGH);
+       di->en_gpio = devm_gpiod_get_optional(dev, "enable",
+                       GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE);
        if (IS_ERR(di->en_gpio))
                return PTR_ERR(di->en_gpio);
 
--
Quoted 2 lines

2.49.0

As explained in the discussion about this flag: I hate this but I haven't yet gotten around to proposing an alternative, so reluctantly:

maintainer
#2 lore raw
In reply to Jisheng Zhang
Quoted 2 lines · Jisheng Zhang

On some platforms, the sy8827n enable gpio may also be used for other purpose, so make it NONEXCLUSIVE to support this case.

When you say "other purpose" which other purposes do you mean - another regulator, or something else?

#3 lore raw
Quoted 6 lines · Mark Brown
Quoted 2 lines · Jisheng Zhang

On some platforms, the sy8827n enable gpio may also be used for other purpose, so make it NONEXCLUSIVE to support this case.

When you say "other purpose" which other purposes do you mean - another regulator, or something else?

Yep, other regulators in my usage case.

maintainer
#4 lore raw
In reply to Jisheng Zhang
Quoted 4 lines · Jisheng Zhang

On some platforms, the sy8827n enable gpio may also be used for other purpose, so make it NONEXCLUSIVE to support this case.

Applied to

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

Thanks!

[1/1] regulator: sy8827n: make enable gpio NONEXCLUSIVE

      commit: 5054740e0092aac528c0589251f612b3b41c9e7b

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