power_mgmt: Add device power management support
Added device power management hook infrastructure. Added DEVICE_INIT_PM and SYS_INIT_PM macros that creates device structures with the supplied device_ops structure containing the hooks. Added example support in gpio_dw driver. Updated the sample app and tested using LPS and Device Suspend Only policies. Change-Id: I2fe347f8d8fd1041d8318e02738990deb8c5d68e Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
bb19e6f82f
commit
4104bbfb08
15 changed files with 276 additions and 144 deletions
|
@ -221,22 +221,6 @@ static int gpio_k64_disable_callback(struct device *dev,
|
|||
}
|
||||
|
||||
|
||||
static int gpio_k64_suspend_port(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
|
||||
static int gpio_k64_resume_port(struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Handler for port interrupts
|
||||
* @param dev Pointer to device structure for driver instance
|
||||
|
@ -290,8 +274,6 @@ static struct gpio_driver_api gpio_k64_drv_api_funcs = {
|
|||
.set_callback = gpio_k64_set_callback,
|
||||
.enable_callback = gpio_k64_enable_callback,
|
||||
.disable_callback = gpio_k64_disable_callback,
|
||||
.suspend = gpio_k64_suspend_port,
|
||||
.resume = gpio_k64_resume_port,
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue