power_mgmt: Update Power Management device driver API

Have one function that can be used for all possible device
purposes using a control code instead of the suspend
resume functions, makes it generic for device control.
Added device power states.
The older replaced APIs will be deprecated in a future patch

Jira: ZEP-954
Change-Id: I6dd3ebfd0fde3546b2d8397f19842f5758fda0c4
Signed-off-by: Amir Kaplan <amir.kaplan@intel.com>
This commit is contained in:
amirkapl 2016-09-01 09:01:10 +03:00 committed by Anas Nashif
commit d305da61e9
3 changed files with 152 additions and 10 deletions

View file

@ -75,6 +75,10 @@ extern "C" {
DEVICE_INIT(sys_init_##init_fn, "", init_fn, NULL, NULL, level, prio)
#endif
#define SYS_DEVICE_DEFINE(drv_name, init_fn, control_fn, level, prio) \
DEVICE_DEFINE(sys_init_##init_fn, drv_name, init_fn, control_fn, \
NULL, NULL, level, prio, NULL)
#ifdef __cplusplus
}
#endif