mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Mark Brown <broonie@kernel.org>
Cc: kernel@pengutronix.de, pawel.moll@arm.com, lgirdwood@gmail.com,
	robh+dt@kernel.org, ijc+devicetree@hellion.org.uk,
	galak@codeaurora.org, linux-kernel@vger.kernel.org,
	shawn.guo@linaro.org, festevam@gmail.com, mark.rutland@arm.com,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] regulator: add mxs regulator driver
Date: Wed, 1 Oct 2014 15:23:44 +0200 (CEST)	[thread overview]
Message-ID: <2002781663.91096.1412169824110.JavaMail.open-xchange@oxbaltgw04.schlund.de> (raw)
In-Reply-To: <20140929171314.GW16977@sirena.org.uk>

Hi Mark,

> Mark Brown <broonie@kernel.org> hat am 29. September 2014 um 19:13
> geschrieben:
>
> > > This really needs a comment to explain what on earth is going on here -
> > > the whole thing with writing the same thing twice with two delays is
> > > more than a little odd. It looks like the driver is trying to busy wait
> > > in cases where the change happens quickly but the comments about "fast"
> > > and "normal" mode make this unclear.
>
> > The regulator driver polls for the DC_OK bit in the power status register.
>
> > Quote for reference manual (p. 935): "High when switching DC-DC
> > converter control loop has stabilized after a voltage target change."
>
> > The two loops comes from the different regulator modes
> > (REGULATOR_MODE_FAST, REGULATOR_MODE_NORMAL).
>
> > In REGULATOR_MODE_FAST the voltage steping is disabled and changing
> > voltage should be fast. In REGULATOR_MODE_NORMAL voltage steping is
> > enabled and it's take a while for reaching the target voltage.
>
> I don't think you've fully understood what the different modes mean
> here, that's not normally how a buck convertor works. The different
> modes would typically control the ability of the regulator to respond
> quickly to changes in load without drifting off regulation, fast mode
> makes the regulator less efficient but more responsive to load changes
> (probably marginally with modern regulators). It should have relatively
> little to do with the ability to ramp the voltage and certainly not on
> the scale there.
>

thanks for your explanation.

Is it better to let the core handles the ramp delay instead of set_voltage_sel
with a busy wait?

I've found that polling DC_OK is only reliable for increasing voltages. So i
think about defining ramp delay in the regulator description.

Stefan

  parent reply	other threads:[~2014-10-01 13:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-27  0:59 [PATCH 0/2] regulator: add support for mxs regulator Stefan Wahren
2014-09-27  0:59 ` [PATCH 1/2] DT: add binding " Stefan Wahren
2014-09-28 10:22   ` Mark Brown
2014-09-29  6:00     ` Stefan Wahren
2014-09-29 10:23       ` Mark Brown
2014-09-29 11:09   ` Mark Rutland
2014-09-29 11:53     ` Stefan Wahren
2014-09-29 12:41       ` Mark Rutland
2014-09-29 13:10         ` Stefan Wahren
2014-09-29 13:23           ` Mark Rutland
2014-10-03 11:46             ` Stefan Wahren
2014-09-27  0:59 ` [PATCH 2/2] regulator: add mxs regulator driver Stefan Wahren
2014-09-28 10:16   ` Mark Brown
2014-09-29  6:38     ` Stefan Wahren
2014-09-29 17:13       ` Mark Brown
2014-09-30  6:40         ` Stefan Wahren
2014-10-01 13:23         ` Stefan Wahren [this message]
2014-10-01 15:57           ` Mark Brown
2014-10-02 16:18   ` Fabio Estevam

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=2002781663.91096.1412169824110.JavaMail.open-xchange@oxbaltgw04.schlund.de \
    --to=stefan.wahren@i2se.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=shawn.guo@linaro.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

Powered by JetHome