public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laxman Dewangan <ldewangan@nvidia.com>
To: Mark Brown <broonie@kernel.org>
Cc: <lgirdwood@gmail.com>, <linux-kernel@vger.kernel.org>,
	<cfreeman@nvidia.com>, <abrestic@chromium.org>,
	<afrid@nvidia.com>
Subject: Re: [PATCH 1/2] regulator: core: add support to get VSEL register from hw driver
Date: Fri, 29 May 2015 11:21:36 +0530	[thread overview]
Message-ID: <5567FE68.5070006@nvidia.com> (raw)
In-Reply-To: <20150528135245.GU21577@sirena.org.uk>


On Thursday 28 May 2015 07:22 PM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Wed, May 27, 2015 at 08:10:20PM +0530, Laxman Dewangan wrote:
>
>> Add callback on the regulator ops to get the voltage selection
>> register address and mask from device regulator driver. Use this
>> new callback in regulator_get_hardware_vsel_register().
> It's not entirely clear to me that this is a good idea - the expected
> use case for getting the vsel register is to hand it off to something
> like a microcontroller for it to use but if the vsel register might
> change at runtime then we also need infrastructure to synchronize those
> changes with whatever is using the register.  How does your system keep
> them in sync?
>

VOUT register address get changed based on DVS pin level. Say we have 
VOUT0 and VOUT1 register here for DVS pin state 0 and 1.
DVS pin can be used in two ways:
1. For dynamic voltage scaling and reducing the i2c command by using 
VOUT0 and VOUT1.
2. For sleep control like when rail is active, use the VOUT0 and when it 
is in sleep use the VOUT1 and control DVS for sleep entry/exit.
3. Some cases, DVS pin is tied to some level.

In our system, CPU-DFLL is another HW module which controls the CPU 
voltage based on CPU frequency request. It issues the i2c command to the 
device for voltage change when frequency get change. For this reason, 
CPU-DFLL need the VSEL register address. The CPU DVFS SW driver controls 
the DVS input pin to control sleep entry/exit and VOUT0 for voltage 
change. So on this case, we really donot need to change the VSEL 
register address for active state voltage change and use the DVS for 
sleep entry/exit.

The problem will be there when external controller use the DVS pin for 
DVFS and need two register address here. In this case, I think external 
controller need to get information from different mechanism rather than 
via regulator driver to avoid complication on regulator driver/framework.


  reply	other threads:[~2015-05-29  5:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 14:40 [PATCH 1/2] regulator: core: add support to get VSEL register from hw driver Laxman Dewangan
2015-05-27 14:40 ` [PATCH 2/2] regulator: max8973: Implement callback to get vsel and mask Laxman Dewangan
2015-05-28 13:52 ` [PATCH 1/2] regulator: core: add support to get VSEL register from hw driver Mark Brown
2015-05-29  5:51   ` Laxman Dewangan [this message]
2015-05-29  9:49     ` Mark Brown
2015-05-29 11:43       ` Laxman Dewangan
2015-06-05 13:36       ` Laxman Dewangan
2015-06-05 16:58         ` 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=5567FE68.5070006@nvidia.com \
    --to=ldewangan@nvidia.com \
    --cc=abrestic@chromium.org \
    --cc=afrid@nvidia.com \
    --cc=broonie@kernel.org \
    --cc=cfreeman@nvidia.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