ARM: OMAP2+: PM/powerdomain: move omap_set_pwrdm_state() to powerdomain code
authorPaul Walmsley <paul@pwsan.com>
Tue, 29 Jan 2013 20:45:09 +0000 (13:45 -0700)
committerPaul Walmsley <paul@pwsan.com>
Tue, 29 Jan 2013 21:59:57 +0000 (14:59 -0700)
commitc4978fba6b2d4e3a584d72c067a371871fecbedc
tree75add16022eb4e71ae50e1aecb42d1d5a9f420ab
parentf8457c2d8be94779c8c460060e536d3a2a02c8d8
ARM: OMAP2+: PM/powerdomain: move omap_set_pwrdm_state() to powerdomain code

Move omap_set_pwrdm_state() from the PM code to the powerdomain code,
and refactor it to split it up into several functions.  A subsequent patch
will rename it to conform with the existing powerdomain function names.

This version includes some additional documentation, based on a
suggestion from Jean Pihet.  It also modifies omap_set_pwrdm_state()
to not bail out early unless both the powerdomain current power state
and the next power state are equal.  (Previously it would terminate
early if the next power state was equal to the target power state,
which was insufficiently rigorous.)

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Jean Pihet <jean.pihet@newoldbits.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tero Kristo <t-kristo@ti.com>
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/pm.h
arch/arm/mach-omap2/powerdomain.c
arch/arm/mach-omap2/powerdomain.h