> -Original Message-
> From: Sven Schwermer [mailto:s...@svenschwermer.de]
> Sent: 2019年5月31日 18:44
> To: Peng Fan
> Cc: u-boot@lists.denx.de; Jaehoon Chung
> Subject: Re: [PATCH] regulator: Allow autosetting fixed regulators
>
> > How about the following patch? not tested
> >
> > diff
> How about the following patch? not tested
>
> diff --git a/drivers/power/regulator/regulator-uclass.c
> b/drivers/power/regulator/regulator-uclass.c
> index 9118b8eb39..76be95bcd1 100644
> --- a/drivers/power/regulator/regulator-uclass.c
> +++ b/drivers/power/regulator/regulator-uclass.c
> @@ -
> Subject: [PATCH] regulator: Allow autosetting fixed regulators
>
> Fixed regulators don't have a set_value method. Therefore,
> regulator_set_value will return -ENOSYS when called from regulator_autoset.
>
> Accepting this return value allows autosetting fixed regulators.
>
> Signed-off-by: Sv
> For fixed regulator, will min_uV/max_uV be set to value other
> than -ENODATA? I think no.
I see this commonly done (see Linux device trees as well as the u-boot device
trees) and the kernel documentation seems to encourage it:
https://www.kernel.org/doc/Documentation/devicetree/bindings/regul
> Subject: Re: [PATCH] regulator: Allow autosetting fixed regulators
>
> Hi Peng,
>
> > According to code:
> >if (uc_pdata->flags & REGULATOR_FLAG_AUTOSET_UV)
> >ret = regulator_set_value(dev, uc_pdata->min_uV);
> >if (!ret && (uc_pdata->flags & REGULATOR_FLAG_AUTO
Hi Peng,
> According to code:
>if (uc_pdata->flags & REGULATOR_FLAG_AUTOSET_UV)
>ret = regulator_set_value(dev, uc_pdata->min_uV);
>if (!ret && (uc_pdata->flags & REGULATOR_FLAG_AUTOSET_UA))
>ret = regulator_set_current(dev, uc_pdata->min_uA);
>
> S
Hi Sven,
> Subject: [PATCH] regulator: Allow autosetting fixed regulators
>
> Fixed regulators don't have a set_value method. Therefore,
> regulator_set_value will return -ENOSYS when called from regulator_autoset.
>
> Accepting this return value allows autosetting fixed regulators.
>
> Signed-
Fixed regulators don't have a set_value method. Therefore,
regulator_set_value will return -ENOSYS when called from
regulator_autoset.
Accepting this return value allows autosetting fixed regulators.
Signed-off-by: Sven Schwermer
Cc: Jaehoon Chung
Cc: Peng Fan
---
drivers/power/regulator/regu
8 matches
Mail list logo