Example #1
0
static void runtime_resume(struct device * dev)
{
	dev_dbg(dev, "resuming\n");
	if (!dev->power.power_state.event)
		return;
	if (!resume_device(dev))
		dev->power.power_state = PMSG_ON;
}
Example #2
0
void dpm_power_up(void)
{
	while(!list_empty(&dpm_off_irq)) {
		struct list_head * entry = dpm_off_irq.next;
		struct device * dev = to_device(entry);

		get_device(dev);
		list_del_init(entry);
		list_add_tail(entry, &dpm_active);
		resume_device(dev);
		put_device(dev);
	}
}
Example #3
0
int resume_devices_rooted(struct device *root, pm_message_t state)
{
       struct klist_iter i;
       struct device *child;
       int error =0;
       error = resume_device(root, state);
       if(error)
               return error;

       if (!root->p)
	return 0;
       klist_iter_init(&root->p->klist_children, &i);
       while ((child = next_device(&i)) && !error)
               error = resume_devices_rooted(child, state);
       klist_iter_exit(&i);

       return error;
}
Example #4
0
void dpm_resume(void)
{
	down(&dpm_list_sem);
	while(!list_empty(&dpm_off)) {
		struct list_head * entry = dpm_off.next;
		struct device * dev = to_device(entry);

		get_device(dev);
		list_del_init(entry);
		list_add_tail(entry, &dpm_active);

		up(&dpm_list_sem);
		if (!dev->power.prev_state.event)
			resume_device(dev);
		down(&dpm_list_sem);
		put_device(dev);
	}
	up(&dpm_list_sem);
}
Example #5
0
static void runtime_resume(struct device * dev)
{
	if (!dev->power.power_state)
		return;
	resume_device(dev);
}