[U-Boot] [PATCH 2/5] power: regulator use node name when no regulator-name
Simon Glass
sjg at chromium.org
Mon Aug 3 00:31:06 CEST 2015
Hi Peng,
On 28 July 2015 at 08:48, Peng Fan <Peng.Fan at freescale.com> wrote:
> If there is no property named 'regulator-name' for regulators,
> choose node name instead, but not directly return failure value.
>
> Signed-off-by: Peng Fan <Peng.Fan at freescale.com>
> Cc: Przemyslaw Marczak <p.marczak at samsung.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
> drivers/power/regulator/regulator-uclass.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
> index 12e141b..d4f06d5 100644
> --- a/drivers/power/regulator/regulator-uclass.c
> +++ b/drivers/power/regulator/regulator-uclass.c
> @@ -256,7 +256,9 @@ static int regulator_post_bind(struct udevice *dev)
> if (!uc_pdata->name) {
> debug("%s: dev: %s has no property 'regulator-name'\n",
> __func__, dev->name);
> - return -EINVAL;
> + uc_pdata->name = fdt_get_name(blob, offset, NULL);
> + if (!uc_pdata->name)
> + return -EINVAL;
> }
>
> if (regulator_name_is_unique(dev, uc_pdata->name))
> --
> 1.8.4
>
>
What is this for please? Can you point me to the device tree binding
that needs this? I suspect it is fine, but I would like to understand
the purpose.
Regards,
Simon
More information about the U-Boot
mailing list