From 8572830d8806d6a07c03ee75325198ab0178e18a Mon Sep 17 00:00:00 2001 From: Ramakrishna Pallala Date: Tue, 9 Oct 2018 11:06:02 +0530 Subject: [PATCH] include: device: Add a state for force suspend devices Add a device power state for force suspended devices. Signed-off-by: Ramakrishna Pallala --- include/device.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/device.h b/include/device.h index e7cfb2a558e..2f68a357a6f 100644 --- a/include/device.h +++ b/include/device.h @@ -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