summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/omap_device.h
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-07-12 22:48:19 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2011-07-12 22:48:19 +0200
commitc03f007a8bf0e092caeb6856a5c8a850df10b974 (patch)
tree9c75aca05734dcdf04f7203851c78254703dee5e /arch/arm/plat-omap/include/plat/omap_device.h
parent256a5435975e344b975f89c5434aa6f6eeb03fa1 (diff)
downloadblackbird-op-linux-c03f007a8bf0e092caeb6856a5c8a850df10b974.tar.gz
blackbird-op-linux-c03f007a8bf0e092caeb6856a5c8a850df10b974.zip
OMAP: PM: omap_device: add system PM methods for PM domain handling
In the omap_device PM domain callbacks, use omap_device idle/enable to automatically manage device idle states during system suspend/resume. If an omap_device has not already been runtime suspended, the ->suspend_noirq() method of the PM domain will use omap_device_idle() to idle the HW after calling the driver's ->runtime_suspend() callback. Similarily, upon resume, if the device was suspended during ->suspend_noirq(), the ->resume_noirq() method of the PM domain will use omap_device_enable() to enable the HW and then call the driver's ->runtime_resume() callback. If a device has already been runtime suspended, the noirq methods of the PM domain leave the device runtime suspended by default. However, if a driver needs to runtime resume a device during suspend (for example, to change its wakeup settings), it may do so using pm_runtime_get* in it's ->suspend() callback. Signed-off-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/omap_device.h')
-rw-r--r--arch/arm/plat-omap/include/plat/omap_device.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index e4c349ff9fd8..bc36d05e13e4 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -44,6 +44,9 @@ extern struct device omap_device_parent;
#define OMAP_DEVICE_STATE_IDLE 2
#define OMAP_DEVICE_STATE_SHUTDOWN 3
+/* omap_device.flags values */
+#define OMAP_DEVICE_SUSPENDED BIT(0)
+
/**
* struct omap_device - omap_device wrapper for platform_devices
* @pdev: platform_device
@@ -73,6 +76,7 @@ struct omap_device {
s8 pm_lat_level;
u8 hwmods_cnt;
u8 _state;
+ u8 flags;
};
/* Device driver interface (call via platform_data fn ptrs) */
OpenPOWER on IntegriCloud