diff options
author | Nicholas Troast <ntroast@codeaurora.org> | 2016-06-02 17:39:48 -0700 |
---|---|---|
committer | Kyle Yan <kyan@codeaurora.org> | 2016-06-28 17:01:30 -0700 |
commit | f6f4829b35699ba8cb7532a58953eb498fff80f0 (patch) | |
tree | 855f4792217da29b0bc048e267df68b37c89764a /net/bluetooth/lib.c | |
parent | a639c08b808979d77bce460226eadfe3228e5536 (diff) |
regulator: rpm-smd-regulator: implement set_load
A recent change to regulator framework replaced the
regulator_set_optimum_mode API with regulator_set_load.
The regulator_set_load API does the following for regulators which have
not implemented set_load().
- determines the most optimal mode for the given load by calling
get_optimum_mode()
- gets the current mode by calling get_mode()
- calls set_mode() if the modes are different and expects the mode to be
committed to the hardware
The rpm-smd-regulator's get_optimum_mode() remembers the load and uses that
for the upcoming get_mode() call. This causes the framework to never call
the set_mode API, thereby causing rpm-smd-regulator to never send the load
to the RPM.
The set_load op was introduced for hardware which does not support the
set_mode op. This is convenient since the RPM sets the mode according to
the aggregated load requirements. In addition the RPM also supports forcing
certain modes which fits well with the set_mode op.
Implement the set_load op to send the aggregated load vote to RPM, and
repurpose the set_mode op to send the aggregated mode vote to RPM.
Remove the get_optimum_mode op since it is no longer required with this
change.
Repurposing of set_mode should not impact consumers since it has the same
effect as before. Instead of sending a load vote which would cause the RPM
to select the desired mode the mode will be sent directly.
Furthermore, the hpm-min-load device tree property is no longer required
since the mode is no longer set based on the hpm-min-load threshold.
Remove it.
Change-Id: I75cf0b4cfc7a6aec3e6d79da9172ce37ec9d91c1
CRs-Fixed: 1023326
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Diffstat (limited to 'net/bluetooth/lib.c')
0 files changed, 0 insertions, 0 deletions