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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 7 Aug 2015 01:04:23 +0000 (03:04 +0200)
commit064416586190cb058d4c76a4e26b1996f434b6ca
tree59f69276761fe843af7279229010fcdc876e4f3d
parent3ca9bb33c627f22640cfca97fdf88eec0a120dfd
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