Loading drivers/acpi/battery.c +1 −1 Original line number Diff line number Diff line Loading @@ -782,7 +782,7 @@ static int acpi_battery_update(struct acpi_battery *battery, bool resume) if ((battery->state & ACPI_BATTERY_STATE_CRITICAL) || (test_bit(ACPI_BATTERY_ALARM_PRESENT, &battery->flags) && (battery->capacity_now <= battery->alarm))) pm_wakeup_hard_event(&battery->device->dev); pm_wakeup_event(&battery->device->dev, 0); return result; } Loading drivers/acpi/button.c +2 −3 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state) } if (state) pm_wakeup_hard_event(&device->dev); pm_wakeup_event(&device->dev, 0); ret = blocking_notifier_call_chain(&acpi_lid_notifier, state, device); if (ret == NOTIFY_DONE) Loading Loading @@ -402,7 +402,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) } else { int keycode; pm_wakeup_hard_event(&device->dev); pm_wakeup_event(&device->dev, 0); if (button->suspended) break; Loading Loading @@ -534,7 +534,6 @@ static int acpi_button_add(struct acpi_device *device) lid_device = device; } device_init_wakeup(&device->dev, true); printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device)); return 0; Loading drivers/acpi/device_pm.c +1 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ #include <linux/pm_qos.h> #include <linux/pm_domain.h> #include <linux/pm_runtime.h> #include <linux/suspend.h> #include "internal.h" Loading Loading @@ -400,7 +399,7 @@ static void acpi_pm_notify_handler(acpi_handle handle, u32 val, void *not_used) mutex_lock(&acpi_pm_notifier_lock); if (adev->wakeup.flags.notifier_present) { pm_wakeup_ws_event(adev->wakeup.ws, 0, true); __pm_wakeup_event(adev->wakeup.ws, 0); if (adev->wakeup.context.work.func) queue_pm_work(&adev->wakeup.context.work); } Loading drivers/acpi/sleep.c +0 −28 Original line number Diff line number Diff line Loading @@ -663,40 +663,14 @@ static int acpi_freeze_prepare(void) acpi_os_wait_events_complete(); if (acpi_sci_irq_valid()) enable_irq_wake(acpi_sci_irq); return 0; } static void acpi_freeze_wake(void) { /* * If IRQD_WAKEUP_ARMED is not set for the SCI at this point, it means * that the SCI has triggered while suspended, so cancel the wakeup in * case it has not been a wakeup event (the GPEs will be checked later). */ if (acpi_sci_irq_valid() && !irqd_is_wakeup_armed(irq_get_irq_data(acpi_sci_irq))) pm_system_cancel_wakeup(); } static void acpi_freeze_sync(void) { /* * Process all pending events in case there are any wakeup ones. * * The EC driver uses the system workqueue, so that one needs to be * flushed too. */ acpi_os_wait_events_complete(); flush_scheduled_work(); } static void acpi_freeze_restore(void) { acpi_disable_wakeup_devices(ACPI_STATE_S0); if (acpi_sci_irq_valid()) disable_irq_wake(acpi_sci_irq); acpi_enable_all_runtime_gpes(); } Loading @@ -708,8 +682,6 @@ static void acpi_freeze_end(void) static const struct platform_freeze_ops acpi_freeze_ops = { .begin = acpi_freeze_begin, .prepare = acpi_freeze_prepare, .wake = acpi_freeze_wake, .sync = acpi_freeze_sync, .restore = acpi_freeze_restore, .end = acpi_freeze_end, }; Loading drivers/base/power/main.c +5 −0 Original line number Diff line number Diff line Loading @@ -1091,6 +1091,11 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool a if (async_error) goto Complete; if (pm_wakeup_pending()) { async_error = -EBUSY; goto Complete; } if (dev->power.syscore || dev->power.direct_complete) goto Complete; Loading Loading
drivers/acpi/battery.c +1 −1 Original line number Diff line number Diff line Loading @@ -782,7 +782,7 @@ static int acpi_battery_update(struct acpi_battery *battery, bool resume) if ((battery->state & ACPI_BATTERY_STATE_CRITICAL) || (test_bit(ACPI_BATTERY_ALARM_PRESENT, &battery->flags) && (battery->capacity_now <= battery->alarm))) pm_wakeup_hard_event(&battery->device->dev); pm_wakeup_event(&battery->device->dev, 0); return result; } Loading
drivers/acpi/button.c +2 −3 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state) } if (state) pm_wakeup_hard_event(&device->dev); pm_wakeup_event(&device->dev, 0); ret = blocking_notifier_call_chain(&acpi_lid_notifier, state, device); if (ret == NOTIFY_DONE) Loading Loading @@ -402,7 +402,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) } else { int keycode; pm_wakeup_hard_event(&device->dev); pm_wakeup_event(&device->dev, 0); if (button->suspended) break; Loading Loading @@ -534,7 +534,6 @@ static int acpi_button_add(struct acpi_device *device) lid_device = device; } device_init_wakeup(&device->dev, true); printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device)); return 0; Loading
drivers/acpi/device_pm.c +1 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ #include <linux/pm_qos.h> #include <linux/pm_domain.h> #include <linux/pm_runtime.h> #include <linux/suspend.h> #include "internal.h" Loading Loading @@ -400,7 +399,7 @@ static void acpi_pm_notify_handler(acpi_handle handle, u32 val, void *not_used) mutex_lock(&acpi_pm_notifier_lock); if (adev->wakeup.flags.notifier_present) { pm_wakeup_ws_event(adev->wakeup.ws, 0, true); __pm_wakeup_event(adev->wakeup.ws, 0); if (adev->wakeup.context.work.func) queue_pm_work(&adev->wakeup.context.work); } Loading
drivers/acpi/sleep.c +0 −28 Original line number Diff line number Diff line Loading @@ -663,40 +663,14 @@ static int acpi_freeze_prepare(void) acpi_os_wait_events_complete(); if (acpi_sci_irq_valid()) enable_irq_wake(acpi_sci_irq); return 0; } static void acpi_freeze_wake(void) { /* * If IRQD_WAKEUP_ARMED is not set for the SCI at this point, it means * that the SCI has triggered while suspended, so cancel the wakeup in * case it has not been a wakeup event (the GPEs will be checked later). */ if (acpi_sci_irq_valid() && !irqd_is_wakeup_armed(irq_get_irq_data(acpi_sci_irq))) pm_system_cancel_wakeup(); } static void acpi_freeze_sync(void) { /* * Process all pending events in case there are any wakeup ones. * * The EC driver uses the system workqueue, so that one needs to be * flushed too. */ acpi_os_wait_events_complete(); flush_scheduled_work(); } static void acpi_freeze_restore(void) { acpi_disable_wakeup_devices(ACPI_STATE_S0); if (acpi_sci_irq_valid()) disable_irq_wake(acpi_sci_irq); acpi_enable_all_runtime_gpes(); } Loading @@ -708,8 +682,6 @@ static void acpi_freeze_end(void) static const struct platform_freeze_ops acpi_freeze_ops = { .begin = acpi_freeze_begin, .prepare = acpi_freeze_prepare, .wake = acpi_freeze_wake, .sync = acpi_freeze_sync, .restore = acpi_freeze_restore, .end = acpi_freeze_end, }; Loading
drivers/base/power/main.c +5 −0 Original line number Diff line number Diff line Loading @@ -1091,6 +1091,11 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool a if (async_error) goto Complete; if (pm_wakeup_pending()) { async_error = -EBUSY; goto Complete; } if (dev->power.syscore || dev->power.direct_complete) goto Complete; Loading