From mboxrd@z Thu Jan 1 00:00:00 1970
From: Przemyslaw Marczak
Date: Wed, 12 Aug 2015 12:09:51 +0200
Subject: [U-Boot] [PATCH V3 2/6] power: regulator use node name when no
regulator-name
In-Reply-To: <1438937026-8731-3-git-send-email-Peng.Fan@freescale.com>
References: <1438937026-8731-1-git-send-email-Peng.Fan@freescale.com>
<1438937026-8731-3-git-send-email-Peng.Fan@freescale.com>
Message-ID: <55CB1B6F.9020304@samsung.com>
List-Id:
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: u-boot@lists.denx.de
Hello,
On 08/07/2015 10:43 AM, Peng Fan 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
> Cc: Przemyslaw Marczak
> Cc: Simon Glass
> ---
>
> Changes v3:
> None.
>
> Changes v2:
> None. The comments update patch, see 3/6.
>
> 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))
>
Applied to: u-boot-pmic.
Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com