PM / OPP: Add OPP sharing information to OPP library
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 29 Jul 2015 10:53:04 +0000 (16:23 +0530)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 4 Sep 2017 05:33:34 +0000 (14:33 +0900)
commitc8e7cc5163d829371d3c990a7b10ce2d14a0e764
tree1c22b1bf2b5a90395012392a29f499cf9f44c895
parentbb7f9933355232543aa448ea7922dd05e7c69965
PM / OPP: Add OPP sharing information to OPP library

An opp can be shared by multiple devices, for example its very common
for CPUs to share the OPPs, i.e. when they share clock/voltage rails.

This patch adds support of shared OPPs to the OPP library.

Instead of a single device, dev_opp will now contain a list of devices
that use it. It also senses if the device (we are trying to initialize
OPPs for) shares OPPs with a device added earlier and in that case we
update the list of devices managed by OPPs instead of duplicating OPPs
again.

The same infrastructure will be used for the old OPP bindings, with
later patches.

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/opp.c