linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Krzysztof Kozłowski" <k.kozlowski@samsung.com>
To: Hugh Kang <hugh.kang@lge.com>, Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, jonghoon.park@lge.com
Subject: Re: [PATCH] regulator: adding disable options for regulator-always-on and regulator-boots-on
Date: Tue, 04 Nov 2014 15:11:24 +0100	[thread overview]
Message-ID: <5458DE8C.7070909@samsung.com> (raw)
In-Reply-To: <54588C3B.9070605@lge.com>

On 04.11.2014 09:20, Hugh Kang wrote:
> Hello
> 
> On 2014년 11월 03일 21:03, Mark Brown wrote:
>> On Mon, Nov 03, 2014 at 10:26:43AM +0900, Hugh Kang wrote:
>>> From: "hugh.kang" <hugh.kang@lge.com>
>>>
>>> If a regulator is set by always-on option, the regulator will be set forever.
>>> For example, suppose LDO1 is set to always-on at RevA.dts with including of a.dtsi. After that
>>> RevB.dts may wants to include the same a.dtsi but override the LDO1 always-on option. However,
>>> currently there is no way to delete the always-on option, even when we change the LDO1 option value,
>>> the always-on setting is still remains.
>> This sounds like a problem with the way the DTSs have been written - I'd
>> expect the thing to do here is just to move the property to the rev A
>> DTS when rev B is created.  Why is that not the way forward?
>>
>> Otherwise this is an issue which affects any boolean property in the DT
>> so if it's something we need to fix we should be fixing it in a generic
>> fashion that will work for other properties too.
> 
> I understand that I could make Rev.B with b.dtsi due to LDOs option is different. However, aim to use device tree is that making easy steps. Refer to dts option, if you set to be set status disabled option, the driver dose not probe when the system boot up. Even though, the system has different board revision exist. So dts have to be no corrupts any overlap situation.
> I have mentions the simple example to change only one LDOs. However, if someone want to edit many regulators with similar configuration, he has to do lots of copy and paste works. Because he has to create new dts file. So I would suggest to make it as simple as I could.
> 
> Also, I have somehow agree with you that affects any boolean property in the DT.

Now you propose to have a final DTS like:
$ scripts/dtc/dtc -I dtb -O dts
	reg {
		regulator-name = "vdd";
		regulator-min-microvolt = <850000>;
		regulator-max-microvolt = <1100000>;
		regulator-always-on;
		regulator-disable-always-on;
	};
Which one of "always-on" is more important? Later one could add
"regulator-enable-always-even-if-disable-always-on;" ...

The "status" property can be overridden. So maybe the new property
should behave the same way? Something like:
dts-common {
		regulator-status-on = "always-on";
		regulator-boot-on = "boot-on";
}
dst-rev-b {
		regulator-status-on = "default";
		regulator-boot-on = "default";
}

Best regards,
Krzysztof


  reply	other threads:[~2014-11-04 14:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03  1:26 [PATCH] regulator: adding disable options for regulator-always-on and regulator-boots-on Hugh Kang
2014-11-03 10:00 ` Markus Pargmann
2014-11-03 12:03 ` Mark Brown
2014-11-04  8:20   ` Hugh Kang
2014-11-04 14:11     ` Krzysztof Kozłowski [this message]
2014-11-04 19:56     ` Mark Brown
2014-11-06  6:39       ` Hugh Kang

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=5458DE8C.7070909@samsung.com \
    --to=k.kozlowski@samsung.com \
    --cc=broonie@kernel.org \
    --cc=hugh.kang@lge.com \
    --cc=jonghoon.park@lge.com \
    --cc=lgirdwood@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).