All of lore.kernel.org
 help / color / mirror / Atom feed
* Shared regulator usage
@ 2012-11-26 13:13 aghayal
  2012-11-26 13:47 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: aghayal @ 2012-11-26 13:13 UTC (permalink / raw)
  To: broonie; +Cc: linux-arm-msm, collinsd, tsoni

Hi Mark,

We seem to having a small design problem in our drivers with the usage of
the regulator framework. Kindly let us know your thoughts on this.

On our SoC's, the regulator powering the core can be controlled by two
consumers, the cpu freq. driver and a core power reduction driver (two
independent drivers). Each of them can independently control the core
voltage across 0.9v to 1.5v. The problem arises when each of them executes
a set_voltage call with their recommended voltage. The framework's
regulator_check_consumers() check does not allow both these drivers to set
their required voltage.

For example:
Consumer (A) cpu-freq sets the voltage range to {1.275v, 1.375v}. The
regulator framework eventually sets the regulator to 1.275v. Consumer (B)
recommends a lower the voltage say (1.25v) and executes set_volatge on
{1.25v, 1.25v}. This is where regulator_check_consumers() fails as it does
not meet the (A)'s constraint.

We are looking for the right way to handle such a situation using
regulator framework, considering this to be a valid usecase. One way we
could think of is having one of the driver (say cpu-freq) register a
virtual regulator device and have the other driver be its consumer. This
way all the regulator calls to the physical hardware will be routed though
one primary driver which can take care of the adjustments. The problem
with such approach would be scalability for a new consumer, i.e. adding
another consumer for the primary driver would present a similar problem as
the original one.

Please let us know if there's a good way of handling such a situation
using the regulator framework.

Thank you,
Anirudh

QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation.
--

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-11-27 15:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-26 13:13 Shared regulator usage aghayal
2012-11-26 13:47 ` Mark Brown
2012-11-27 11:15   ` Anirudh Ghayal
2012-11-27 11:32     ` Mark Brown
2012-11-27 15:17     ` Kevin Hilman
2012-11-27 15:17       ` Kevin Hilman

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.