From: Peng Fan <b51431@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] power: regulator use node name when no regulator-name
Date: Mon, 3 Aug 2015 08:23:38 +0800 [thread overview]
Message-ID: <20150803002334.GA1452@shlinux2> (raw)
In-Reply-To: <CAPnjgZ1yM-brKDcHz3RZOAn0oOfjRh8Wo1Yvdi=0nahmn2ZTBw@mail.gmail.com>
Hi Simon,
On Sun, Aug 02, 2015 at 04:31:06PM -0600, Simon Glass wrote:
>Hi Peng,
>
>On 28 July 2015 at 08:48, Peng Fan <Peng.Fan@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@freescale.com>
>> Cc: Przemyslaw Marczak <p.marczak@samsung.com>
>> Cc: Simon Glass <sjg@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.
The regulator device tree is as following:
regulators {
sw1a_reg: sw1a {
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1475000>;
regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <6250>;
};
/* use sw1c_reg to align with pfuze100/pfuze200 */
sw1c_reg: sw1b {
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1475000>;
regulator-boot-on;
regulator-always-on;
regulator-ramp-delay = <6250>;
};
There is no regulator-name property. From the current regulator framework,
if there is no regulator-name property, it will return -EINVAL. So,
I did this patch to use node name, if there is no regulator-name property.
Regards,
Peng.
--
next prev parent reply other threads:[~2015-08-03 0:23 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 14:48 [U-Boot] [PATCH 0/5] Power: pfuze100: support driver model and regulator Peng Fan
2015-07-28 14:48 ` [U-Boot] [PATCH 1/5] power: pfuze100 correct SWBST macro definition Peng Fan
2015-08-02 22:30 ` Simon Glass
2015-07-28 14:48 ` [U-Boot] [PATCH 2/5] power: regulator use node name when no regulator-name Peng Fan
2015-08-02 22:31 ` Simon Glass
2015-08-03 0:23 ` Peng Fan [this message]
2015-08-03 15:00 ` Przemyslaw Marczak
2015-08-04 0:12 ` Peng Fan
2015-07-28 14:48 ` [U-Boot] [PATCH 3/5] power: pmic: pfuze100 support driver model Peng Fan
2015-08-02 22:31 ` Simon Glass
2015-08-03 15:01 ` Przemyslaw Marczak
2015-08-04 0:15 ` Peng Fan
2015-07-28 14:48 ` [U-Boot] [PATCH 4/5] power: regulator: add pfuze100 support Peng Fan
2015-08-02 22:30 ` Simon Glass
2015-08-03 0:38 ` Peng Fan
2015-08-04 2:08 ` Peng Fan
2015-08-04 12:46 ` Simon Glass
2015-08-04 13:16 ` Przemyslaw Marczak
2015-08-04 13:16 ` Peng Fan
2015-07-28 14:48 ` [U-Boot] [PATCH 5/5] fsl: common: pfuze: no use original pfuze code if DM_PMIC Peng Fan
2015-08-02 22:30 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150803002334.GA1452@shlinux2 \
--to=b51431@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox