public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Zhong <zyw@rock-chips.com>
To: Mark Brown <broonie@kernel.org>
Cc: heiko@sntech.de, dianders@chromium.org,
	linux-rockchip@lists.infradead.org,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] regulator: rk808: add dvs support
Date: Wed, 31 Dec 2014 10:21:42 +0800	[thread overview]
Message-ID: <54A35DB6.8070200@rock-chips.com> (raw)
In-Reply-To: <20141230170445.GP17800@sirena.org.uk>


On 12/31/2014 01:04 AM, Mark Brown wrote:
> On Tue, Dec 30, 2014 at 11:07:14AM +0800, Chris Zhong wrote:
>> On 12/30/2014 01:25 AM, Mark Brown wrote:
>>> So, this seems a bit odd.  What we appear to be doing here is
>>> alternating between the two different voltage setting registers which is
>>> all well and good but makes me wonder why we're bothering - it's a bit
>>> more work than just sticking with one.  We do get...
>> you mean check the old_selector and selector? I think
>> _regulator_do_set_voltage have done it.
> No, I mean that we may as well just always write to the same register
> and save a bunch of code.
No, when we pull down DVSn pin, the voltage value is from 
RK808_BUCK1_ON_VSEL_REG,
and when we pull up DVSn pin, the voltage value if from 
RK808_BUCK1_ON_VSEL_REG+2.
We want to this dvs function for a better voltage wave, avoid overshoot, 
if someone do not
need this function, they could remove the setting of DVSn pin in dts 
file, and at that time,
rk808_regulator will use a same register for setting voltage.


>>> ...this but unless the voltage typically ramps much faster than spec
>>> it's never clear to me that we're actually winning by polling the pin
>>> instead of just dead reckoning the time, it's more work for the CPU to
>>> poll the GPIO than to sleep after all.
>> Actually, it's slower than spec, so I think getting this dvsok pin state
>> is safer than delay.
> Well, that suggests that the spec is wrong which ought to be fixed
> anyway oughtn't it?  Or are you saying that the delay is inconsistent as
> well as slower than advertised?
the spec said 2/4/6/10 mv/us, but the ramp will change depending on the 
load.
So I think the dvsok pin is more accurate, since it It will soon change, 
once the
regulator is completed. the delay is a fixed time. it is faster than 
dvsok pin.




  reply	other threads:[~2014-12-31  2:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15  3:07 [PATCH v3 0/2] add the dvs support for rk808 Chris Zhong
2014-12-15  3:07 ` [PATCH v3 1/2] mfd: dt-bindings: add the description about dvs gpio " Chris Zhong
2014-12-15  3:07 ` [PATCH v3 2/2] regulator: rk808: add dvs support Chris Zhong
2014-12-29 17:25   ` Mark Brown
2014-12-30  3:07     ` Chris Zhong
2014-12-30 17:04       ` Mark Brown
2014-12-31  2:21         ` Chris Zhong [this message]
2015-01-02 18:41     ` Doug Anderson
2015-01-06 12:12       ` Mark Brown

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=54A35DB6.8070200@rock-chips.com \
    --to=zyw@rock-chips.com \
    --cc=broonie@kernel.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.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