/* acpi_enable_wakeup_device - enable wakeup devices @sleep_state: ACPI state Enable all wakup devices's GPE  */
void acpi_enable_wakeup_device(u8 sleep_state)
/* acpi_enable_wakeup_device - enable wakeup devices @sleep_state: ACPI state Enable all wakup devices's GPE  */
void acpi_enable_wakeup_device(u8 sleep_state)
{
	struct list_head *node, *next;
	list_for_each_safe(node, next, &acpi_wakeup_device_list) {
		struct acpi_device *dev =
			container_of(node, struct acpi_device, wakeup_list);
		if (!dev->wakeup.flags.valid)
			continue;
		if ((!dev->wakeup.state.enabled && !dev->wakeup.prepare_count)
		    || sleep_state > (u32) dev->wakeup.sleep_state) {
			if (dev->wakeup.flags.run_wake) {
				acpi_set_gpe_type(dev->wakeup.gpe_device,
						  dev->wakeup.gpe_number,
						  ACPI_GPE_TYPE_RUNTIME);
			}
			continue;
		}
		if (!dev->wakeup.flags.run_wake)
			acpi_enable_gpe(dev->wakeup.gpe_device,
					dev->wakeup.gpe_number);
	}
}