Re: [PATCH] regulator: sy8827n: make enable gpio NONEXCLUSIVE
From: Bartosz Golaszewski
Date: Mon Jun 30 2025 - 09:41:37 EST
On Sun, Jun 29, 2025 at 12:14 PM Jisheng Zhang <jszhang@xxxxxxxxxx> wrote:
>
> 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 <jszhang@xxxxxxxxxx>
> ---
> drivers/regulator/sy8827n.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/sy8827n.c b/drivers/regulator/sy8827n.c
> index f11ff38b36c9..0b811514782f 100644
> --- a/drivers/regulator/sy8827n.c
> +++ b/drivers/regulator/sy8827n.c
> @@ -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);
>
> --
> 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:
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>