All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Gopinath, Thara" <thara@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"paul@pwsan.com" <paul@pwsan.com>,
	"Sripathy, Vishwanath" <vishwanath.bs@ti.com>,
	"Sawant, Anand" <sawant@ti.com>,
	"Cousson, Benoit" <b-cousson@ti.com>,
	"thomas.petazzoni@free-electrons.com"
	<thomas.petazzoni@free-electrons.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 01/13] OMAP: Introduce a user list for each voltage domain instance in the voltage driver.
Date: Fri, 03 Sep 2010 09:41:11 -0700	[thread overview]
Message-ID: <87r5ha3hlk.fsf@deeprootsystems.com> (raw)
In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB03291AD889@dbde02.ent.ti.com> (Thara Gopinath's message of "Fri, 3 Sep 2010 12:39:21 +0530")

+ Mark, Liam for regulator questions, thread in archives here:
  http://marc.info/?l=linux-omap&m=128349777617270&w=2

"Gopinath, Thara" <thara@ti.com> writes:

>>>-----Original Message-----
>>>From: Kevin Hilman [mailto:khilman@deeprootsystems.com]
>>>Sent: Thursday, September 02, 2010 4:22 AM
>>>To: Gopinath, Thara
>>>Cc: linux-omap@vger.kernel.org; paul@pwsan.com; Sripathy, Vishwanath; Sawant, Anand; Cousson, Benoit;
>>>thomas.petazzoni@free-electrons.com
>>>Subject: Re: [PATCH 01/13] OMAP: Introduce a user list for each voltage domain instance in the
>>>voltage driver.
>>>
>>>Thara Gopinath <thara@ti.com> writes:
>>>
>>>> This patch introduces a user list of devices associated with each
>>>> voltage domain instance. The user list is implemented using plist
>>>> structure with priority node populated with the voltage values.
>>>> This patch also adds an API which will take in a device and
>>>> requested voltage as parameters, adds the info to the user list
>>>> and returns back the maximum voltage requested by all the user
>>>> devices. This can be used anytime to get the voltage that the
>>>> voltage domain instance can be transitioned into.
>>>>
>>>> Signed-off-by: Thara Gopinath <thara@ti.com>
>>>
>>>Looking closer at this, keeping track of a list of devices and
>>>constraints is what the regulator framework does as well.
>>>
>>>Before we get too far down this path, we need to start working with
>>>Thomas Petazzoni to better understand how we can use the regulator
>>>framework for much of the management levels of the voltage layer.
>>>
>>>I'd rather not re-invent some of the management/constraints management
>>>that could be done by the regulator framework.
>>>
>>>Basically, I think
>>>
>>>  r = regulator_get(dev, voltdm->name)
>>>  regulator_set_voltage(r, volt)
>>>
>>>would basially be the equivalent of
>>>
>>>  omap_voltage_add_userreq(voldm, dev, &volt);
>>>  omap_scale_voltage(voltdm, volt)
>
> Hello Kevin,
>
> Let me startr off by saying that I am not an expert on regulator
> framework and hence my assessment below could be wrong.
> I agree probably regulator framework would be 
> the best place for this but then IMO regulator framework needs a lot of
> changes to support the kind of use-counting we need in the voltage layer.
> To start with regulator_get  keeps the use counting only for enabling or
> disabling a regulator. It does not have a mechanism of adding the requested
> voltage to a list and picking out the highest among the added values.

Like you, I'm no expert on the regulator framework internals, but it
appears to have a pretty thorough system of constraints management that
upon first glance seems to be a good fit for what we need.  It may need
to be extended, but I would rather see us enhance the regulator
framework than re-invent the constraints management.

> regulator_set_voltage could be used to route the call to omap_scale_voltage
> but then it is just a wrapper.

Yes, just a wrapper, but users would be then using a a well defined and
well documented API.

Kevin


  reply	other threads:[~2010-09-03 16:41 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 11:19 [PATCH 00/13] OMAP: Basic DVFS framework Thara Gopinath
2010-08-18 11:20 ` [PATCH 01/13] OMAP: Introduce a user list for each voltage domain instance in the voltage driver Thara Gopinath
2010-08-27 23:53   ` Kevin Hilman
2010-08-30 22:56     ` Kevin Hilman
2010-09-16  9:59     ` Gopinath, Thara
2010-09-16 15:20       ` Kevin Hilman
2010-09-17 14:33         ` Gopinath, Thara
2010-09-01 22:51   ` Kevin Hilman
2010-09-02  7:43     ` Thomas Petazzoni
2010-09-02  8:17       ` Nishanth Menon
2010-09-02 10:00         ` Felipe Balbi
2010-09-02 10:17           ` Nishanth Menon
2010-09-02 10:28             ` Felipe Balbi
2010-09-02 10:40               ` Nishanth Menon
2010-09-02 11:16                 ` Felipe Balbi
2010-09-02 17:47         ` Kevin Hilman
2010-09-02 18:46           ` Nishanth Menon
2010-09-02 18:56             ` Kevin Hilman
2010-09-03  7:09     ` Gopinath, Thara
2010-09-03 16:41       ` Kevin Hilman [this message]
2010-09-03 17:30         ` Mark Brown
2010-09-03 18:00           ` Kevin Hilman
2010-09-03 18:20             ` Mark Brown
2010-09-06 19:59               ` Eduardo Valentin
2010-09-06 20:21                 ` Liam Girdwood
2010-09-06 21:21                 ` Mark Brown
2010-11-23  9:26               ` Thomas Petazzoni
2010-11-24  9:45               ` Thomas Petazzoni
2010-11-24  9:51                 ` Mark Brown
2010-09-03 18:27       ` Kevin Hilman
2010-09-06 11:01         ` Mark Brown
2010-08-18 11:20 ` [PATCH 02/13] OMAP: Introduce API in the OPP layer to find the opp entry corresponding to a voltage Thara Gopinath
2010-08-18 11:20 ` [PATCH 03/13] OMAP: Introduce voltage domain information in the hwmod structures Thara Gopinath
2010-08-18 11:20 ` [PATCH 04/13] OMAP: Introduce API to return a device list associated with a voltage domain Thara Gopinath
2010-08-28  0:52   ` Kevin Hilman
2010-08-28  0:54     ` Kevin Hilman
2010-09-16 10:04     ` Gopinath, Thara
2010-09-16 15:22       ` Kevin Hilman
2010-09-17 14:48         ` Gopinath, Thara
2010-09-20 18:00           ` Kevin Hilman
2010-09-02  0:33   ` Kevin Hilman
2010-09-16 10:10     ` Gopinath, Thara
2010-09-16 15:23       ` Kevin Hilman
2010-08-18 11:20 ` [PATCH 05/13] OMAP: Introduce device specific set rate and get rate in device opp structures Thara Gopinath
2010-09-02 23:41   ` Kevin Hilman
2010-09-16 10:21     ` Gopinath, Thara
2010-09-16 15:28       ` Kevin Hilman
2010-09-17 14:55         ` Gopinath, Thara
2010-09-18 10:13           ` Cousson, Benoit
2010-09-20 17:35             ` Kevin Hilman
2010-09-29 11:16             ` Gopinath, Thara
2010-09-29 20:25               ` Cousson, Benoit
2010-08-18 11:20 ` [PATCH 06/13] OMAP: Voltage layer changes to support DVFS Thara Gopinath
2010-08-18 11:20 ` [PATCH 07/13] OMAP: Introduce dependent voltage domain support Thara Gopinath
2010-08-18 11:20 ` [PATCH 08/13] OMAP: Introduce device set_rate and get_rate Thara Gopinath
2010-08-18 11:20 ` [PATCH 09/13] OMAP: Disable smartreflex across DVFS Thara Gopinath
2010-08-18 11:20 ` [PATCH 10/13] OMAP3: Introduce custom set rate and get rate APIs for scalable devices Thara Gopinath
2010-08-31  0:06   ` Kevin Hilman
2010-08-18 11:20 ` [PATCH 11/13] OMAP3: Update cpufreq driver to use the new set_rate API Thara Gopinath
2010-08-18 11:20 ` [PATCH 12/13] OMAP3: Introduce voltage domain info in the hwmod structures Thara Gopinath
2010-08-18 11:20 ` [PATCH 13/13] OMAP3: Add voltage dependency table for VDD1 Thara Gopinath

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=87r5ha3hlk.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=b-cousson@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=paul@pwsan.com \
    --cc=sawant@ti.com \
    --cc=thara@ti.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=vishwanath.bs@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.