Re: [PATCH 01/13] OMAP: Introduce a user list for each voltage domain instance in the voltage driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

"Gopinath, Thara" <thara@xxxxxx> writes:

>>>-----Original Message-----
>>>From: Kevin Hilman [mailto:khilman@xxxxxxxxxxxxxxxxxxx]
>>>Sent: Thursday, September 02, 2010 4:22 AM
>>>To: Gopinath, Thara
>>>Cc: linux-omap@xxxxxxxxxxxxxxx; paul@xxxxxxxxx; Sripathy, Vishwanath; Sawant, Anand; Cousson, Benoit;
>>>thomas.petazzoni@xxxxxxxxxxxxxxxxxx
>>>Subject: Re: [PATCH 01/13] OMAP: Introduce a user list for each voltage domain instance in the
>>>voltage driver.
>>>
>>>Thara Gopinath <thara@xxxxxx> 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@xxxxxx>
>>>
>>>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

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux