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
|
@ -271,16 +271,6 @@ static inline int gpio_qmsi_disable_callback(struct device *port,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int gpio_qmsi_suspend_port(struct device *port)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int gpio_qmsi_resume_port(struct device *port)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static struct gpio_driver_api api_funcs = {
|
||||
.config = gpio_qmsi_config,
|
||||
.write = gpio_qmsi_write,
|
||||
|
@ -288,8 +278,6 @@ static struct gpio_driver_api api_funcs = {
|
|||
.set_callback = gpio_qmsi_set_callback,
|
||||
.enable_callback = gpio_qmsi_enable_callback,
|
||||
.disable_callback = gpio_qmsi_disable_callback,
|
||||
.suspend = gpio_qmsi_suspend_port,
|
||||
.resume = gpio_qmsi_resume_port
|
||||
};
|
||||
|
||||
int gpio_qmsi_init(struct device *port)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue