include: device: Add a state for force suspend devices

Add a device power state for force suspended devices.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
This commit is contained in:
Ramakrishna Pallala 2018-10-09 11:06:02 +05:30 committed by Anas Nashif
commit 8572830d88

View file

@ -286,6 +286,18 @@ struct device *device_get_binding(const char *name);
*/
#define DEVICE_PM_SUSPEND_STATE 3
/** @def DEVICE_PM_FORCE_SUSPEND_STATE
*
* @brief device is in force SUSPEND power state
*
* @details Driver puts the device in suspended state after
* completing the ongoing transactions and will not process any
* queued work or will not take any new requests for processing.
* Most device context is lost by the hardware. Device drivers must
* save and restore or reinitialize any context lost by the hardware.
*/
#define DEVICE_PM_FORCE_SUSPEND_STATE 4
/** @def DEVICE_PM_OFF_STATE
*
* @brief device is in OFF power state
@ -294,7 +306,7 @@ struct device *device_get_binding(const char *name);
* The device context is lost when this state is entered, so the OS
* software will reinitialize the device when powering it back on
*/
#define DEVICE_PM_OFF_STATE 4
#define DEVICE_PM_OFF_STATE 5
/* Constants defining support device power commands */
#define DEVICE_PM_SET_POWER_STATE 1