From: Pramod Gurav <pramod.gurav@smartplayin.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: linux-kernel@vger.kernel.org, broonie@kernel.org,
lgirdwood@gmail.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH] regulator: core: do not disable regulator if boot_on is set
Date: Tue, 25 Nov 2014 16:47:46 +0530 [thread overview]
Message-ID: <5474655A.9090201@smartplayin.com> (raw)
In-Reply-To: <1416913037.2741.1.camel@pengutronix.de>
On Tuesday 25 November 2014 04:27 PM, Lucas Stach wrote:
> Am Dienstag, den 25.11.2014, 16:23 +0530 schrieb Pramod Gurav:
>> Currently the regulator core disables the regulators which are unused
>> or whose reference count is zero or if they are configured always_on.
>> This change adds a check in this logic to see if a regulator is
>> configured as boot_on and does not disable it if found true.
>>
>> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
>>
>> ---
>>
>> The issue was found on apq8064 based IFC6410 on which a fixed regulator
>> configured as regulator-boot-on in DT and was being disabled when not in
>> use. Tested this change on this board and found working.
>>
> Um, why would this be the correct fix? regulator-boot-on just tells the
> regulator core that the bootloader might have left this regulator
> enabled. If you want it to stay on after the kernel finished init you
> need to mark it as always-on.
Thanks Lucas. Shall mark it as alway_on.
>
>> drivers/regulator/core.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
>> index cd87c0c..9f7a13f 100644
>> --- a/drivers/regulator/core.c
>> +++ b/drivers/regulator/core.c
>> @@ -4019,7 +4019,7 @@ static int __init regulator_init_complete(void)
>> ops = rdev->desc->ops;
>> c = rdev->constraints;
>>
>> - if (c && c->always_on)
>> + if (c && (c->always_on || c->boot_on))
>> continue;
>>
>> if (c && !(c->valid_ops_mask & REGULATOR_CHANGE_STATUS))
>
next prev parent reply other threads:[~2014-11-25 11:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 10:53 [RFC PATCH] regulator: core: do not disable regulator if boot_on is set Pramod Gurav
2014-11-25 10:57 ` Lucas Stach
2014-11-25 11:17 ` Pramod Gurav [this message]
2014-11-25 11:05 ` Mark Brown
2014-11-25 11:17 ` Pramod Gurav
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=5474655A.9090201@smartplayin.com \
--to=pramod.gurav@smartplayin.com \
--cc=broonie@kernel.org \
--cc=l.stach@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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