diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2010-12-21 21:31:55 -0700 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-12-21 21:31:55 -0700 |
commit | c80705aa7074045e7431ed2ebeb0f7d5773615ab (patch) | |
tree | 8c62b8e0456a95844237bdb87e021318fc588f9a /arch/arm/plat-omap/include/plat/omap-pm.h | |
parent | 7f595674e08b8b4d3faf64a19bccc95445d7ed35 (diff) |
OMAP: PM: implement context loss count APIs
Implement OMAP PM layer omap_pm_get_dev_context_loss_count() API by
creating similar APIs at the omap_device and omap_hwmod levels. The
omap_hwmod level call is the layer with access to the powerdomain
core, so it is the place where the powerdomain is queried to get the
context loss count.
The new APIs return an unsigned value that can wrap as the
context-loss count grows. However, the wrapping is not important as
the role of this function is to determine context loss by checking for
any difference in subsequent calls to this function.
Note that these APIs at each level can return zero when no context
loss is detected, or on errors. This is to avoid returning error
codes which could potentially be mistaken for large context loss
counters.
NOTE: only works for devices which have been converted to use
omap_device/omap_hwmod.
Longer term, we could possibly remove this API from the OMAP PM layer,
and instead directly use the omap_device level API.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/omap-pm.h')
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap-pm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap-pm.h b/arch/arm/plat-omap/include/plat/omap-pm.h index 47d61107ccd..c07bb44e9e5 100644 --- a/arch/arm/plat-omap/include/plat/omap-pm.h +++ b/arch/arm/plat-omap/include/plat/omap-pm.h @@ -350,9 +350,9 @@ unsigned long omap_pm_cpu_get_freq(void); * driver must restore device context. If the number of context losses * exceeds the maximum positive integer, the function will wrap to 0 and * continue counting. Returns the number of context losses for this device, - * or -EINVAL upon error. + * or zero upon error. */ -int omap_pm_get_dev_context_loss_count(struct device *dev); +u32 omap_pm_get_dev_context_loss_count(struct device *dev); #endif |