regulator: sy8827n: make enable gpio NONEXCLUSIVE
Subsystems (2)
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
@@ -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
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.
Signed-off-by Jisheng Zhang <[email protected]>--- drivers/regulator/sy8827n.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/regulator/sy8827n.c +2
-2@@ -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:
Mark Brown
maintainerQuoted 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?
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.
Mark Brown
maintainerQuoted 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