PM / Domains: Use subsystem runtime suspend/resume callbacks by default
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 15 Jun 2012 22:02:22 +0000 (00:02 +0200)
committerMrutyunjay Sawant <msawant@nvidia.com>
Fri, 19 Oct 2012 14:00:25 +0000 (07:00 -0700)
commitcf5447f847fd6b56d5ad6c664613e0fa7514409a
treefd2fb1c35bd84ae0b0879bc226e26503182a1c06
parent8c05217cdef7c3cc300aded675b69e2830c6e08a
PM / Domains: Use subsystem runtime suspend/resume callbacks by default

Currently, the default "save state" and "restore state" routines
for generic PM domains, pm_genpd_default_save_state() and
pm_genpd_default_restore_state(), respectively, only use runtime PM
callbacks provided by device drivers, but in general those callbacks
need not provide the entire necessary functionality.  Namely, in
general it may be necessary to execute subsystem (i.e. device type,
device class or bus type) callbacks that will carry out all of the
necessary operations.

For this reason, modify pm_genpd_default_save_state() and
pm_genpd_default_restore_state() to execute subsystem callbacks,
if they are provided, and fall back to driver callbacks otherwise.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
(cherry picked from commit 0b589741b8b83a33e25fb32bb714ea1b972af5aa)

Change-Id: I573c7f62ea6ebd24a4dc643eb69da73d4b543017
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/145218
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/base/power/domain.c