mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Boyd <stephen.boyd@linaro.org>
To: Mark Brown <broonie@kernel.org>,
	"Georgi Djakov" <georgi.djakov@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] regulator: Support ramp-up delay for drivers with get_voltage()
Date: Wed, 30 Mar 2016 11:17:09 -0700	[thread overview]
Message-ID: <20160330181709.5175.51228@sboyd-linaro> (raw)
In-Reply-To: <20160330173658.GN2350@sirena.org.uk>

Quoting Mark Brown (2016-03-30 10:36:58)
> On Wed, Mar 30, 2016 at 05:23:12PM +0300, Georgi Djakov wrote:
> 
> > +     } else if (_regulator_is_enabled(rdev) &&
> > +                rdev->desc->ops->set_voltage_time_sel &&
> > +                rdev->desc->ops->get_voltage) {
> > +             int uV = rdev->desc->ops->get_voltage(rdev);
> > +
> > +             if (uV > 0) {
> > +                     old_selector = regulator_map_voltage(rdev, uV, uV);
> > +                     if (old_selector < 0)
> > +                             return old_selector;
> > +             }
> 
> If a driver is using selectors it should use selectors uninformly, it
> should not mix and match selector and raw voltage interfaces.  If we
> the set and get operations are not symmetric I'd expect we're going to
> run into problems sooner rather than later.

This is for the qcom spmi regulator driver. I seem to have put in the
set_voltage_time_sel op but missed the fact that the regulator core
wasn't calling that op to find out how much time to delay. So we have
raw voltage set and get ops and this selector based delay op.

Do we need to change the ops to be selector based if we want the
regulator core to delay after changing voltages? Or do we need to put
the delay directly into the set_voltage() op in the driver?

  reply	other threads:[~2016-03-30 18:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 14:23 Georgi Djakov
2016-03-30 17:36 ` Mark Brown
2016-03-30 18:17   ` Stephen Boyd [this message]
2016-03-30 18:32     ` Mark Brown
     [not found]       ` <20160330193426.5881.34139@sboyd-linaro>
2016-03-30 20:39         ` 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=20160330181709.5175.51228@sboyd-linaro \
    --to=stephen.boyd@linaro.org \
    --cc=broonie@kernel.org \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.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

all inboxes | Powered by JetHome®