Lines Matching full:wakeup
3 * drivers/base/power/wakeup.c - System wakeup events framework
27 * if wakeup events are registered during or immediately before the transition.
31 /* First wakeup IRQ seen by the kernel in the last cycle. */
39 * Combined counters of registered wakeup events and wakeup events in progress.
78 * @name: Name of the new wakeup source.
148 * @ws: Wakeup source to destroy.
150 * Use only for wakeup source objects created with wakeup_source_create().
164 * wakeup_source_add - Add given object to the list of wakeup sources.
165 * @ws: Wakeup source object to add to the list.
185 * wakeup_source_remove - Remove given object from the wakeup sources list.
186 * @ws: Wakeup source object to remove from the list.
203 * this wakeup source as not registered. in wakeup_source_remove()
210 * wakeup_source_register - Create wakeup source and add it to the list.
211 * @dev: Device this wakeup source is associated with (or NULL if virtual).
212 * @name: Name of the wakeup source to register.
236 * wakeup_source_unregister - Remove wakeup source from the list and remove it.
237 * @ws: Wakeup source object to unregister.
252 * wakeup_sources_read_lock - Lock wakeup source list for read.
264 * wakeup_sources_read_unlock - Unlock wakeup source list.
274 * wakeup_sources_walk_start - Begin a walk on wakeup source list
276 * Returns first object of the list of wakeup sources.
278 * Note that to be safe, wakeup sources list needs to be locked by calling
290 * wakeup_sources_walk_next - Get next wakeup source from the list
291 * @ws: Previous wakeup source object
293 * Note that to be safe, wakeup sources list needs to be locked by calling
306 * device_wakeup_attach - Attach a wakeup source object to a device object.
308 * @ws: Wakeup source object to attach to @dev.
310 * This causes @dev to be treated as a wakeup device.
315 if (dev->power.wakeup) { in device_wakeup_attach()
319 dev->power.wakeup = ws; in device_wakeup_attach()
327 * device_wakeup_enable - Enable given device to be a wakeup source.
330 * Create a wakeup source object, register it and attach it to @dev.
356 * device_wakeup_attach_irq - Attach a wakeirq to a wakeup source
360 * Attach a device wakeirq to the wakeup source so the device
371 ws = dev->power.wakeup; in device_wakeup_attach_irq()
376 dev_err(dev, "Leftover wakeup IRQ found, overriding\n"); in device_wakeup_attach_irq()
382 * device_wakeup_detach_irq - Detach a wakeirq from a wakeup source
385 * Removes a device wakeirq from the wakeup source.
393 ws = dev->power.wakeup; in device_wakeup_detach_irq()
431 * device_wakeup_detach - Detach a device's wakeup source object from it.
432 * @dev: Device to detach the wakeup source object from.
434 * After it returns, @dev will not be treated as a wakeup device any more.
441 ws = dev->power.wakeup; in device_wakeup_detach()
442 dev->power.wakeup = NULL; in device_wakeup_detach()
448 * device_wakeup_disable - Do not regard a device as a wakeup source any more.
451 * Detach the @dev's wakeup source object from it, unregister this wakeup source
467 * device_set_wakeup_capable - Set/reset device wakeup capability flag.
472 * wakeup-related attributes to sysfs. Otherwise, unset the @dev's
473 * power.can_wakeup flag and remove its wakeup-related attributes from sysfs.
489 dev_info(dev, "Wakeup sysfs attributes not added\n"); in device_set_wakeup_capable()
513 * wakeup_source_not_registered - validate the given wakeup source.
514 * @ws: Wakeup source to be validated.
526 * The functions below use the observation that each wakeup event starts a
528 * will end depends on how the wakeup event is going to be processed after being
532 * First, a wakeup event may be detected by the same functional unit that will
540 * Second, a wakeup event may be detected by one functional unit and processed
554 * wakeup_source_activate - Mark given wakeup source as active.
555 * @ws: Wakeup source to handle.
558 * core of the event by incrementing the counter of the wakeup events being
566 "unregistered wakeup source\n")) in wakeup_source_activate()
582 * wakeup_source_report_event - Report wakeup event using the given source.
583 * @ws: Wakeup source to report the event for.
601 * __pm_stay_awake - Notify the PM core of a wakeup event.
602 * @ws: Wakeup source object associated with the source of the event.
624 * pm_stay_awake - Notify the PM core that a wakeup event is being processed.
625 * @dev: Device the wakeup event is related to.
627 * Notify the PM core of a wakeup event (signaled by @dev) by calling
628 * __pm_stay_awake for the @dev's wakeup source object.
630 * Call this function after detecting of a wakeup event if pm_relax() is going
642 __pm_stay_awake(dev->power.wakeup); in pm_stay_awake()
659 * wakeup_source_deactivate - Mark given wakeup source as inactive.
660 * @ws: Wakeup source to handle.
662 * Update the @ws' statistics and notify the PM core that the wakeup source has
663 * become inactive by decrementing the counter of wakeup events being processed
664 * and incrementing the counter of registered wakeup events.
703 * Increment the counter of registered wakeup events and decrement the in wakeup_source_deactivate()
704 * counter of wakeup events in progress simultaneously. in wakeup_source_deactivate()
715 * __pm_relax - Notify the PM core that processing of a wakeup event has ended.
716 * @ws: Wakeup source object associated with the source of the event.
718 * Call this function for wakeup events whose processing started with calling
738 * pm_relax - Notify the PM core that processing of a wakeup event has ended.
741 * Execute __pm_relax() for the @dev's wakeup source object.
751 __pm_relax(dev->power.wakeup); in pm_relax()
757 * pm_wakeup_timer_fn - Delayed finalization of a wakeup event.
760 * Call wakeup_source_deactivate() for the wakeup source whose address is stored
781 * pm_wakeup_ws_event - Notify the PM core of a wakeup event.
782 * @ws: Wakeup source object associated with the event source.
786 * Notify the PM core of a wakeup event whose source is @ws that will take
825 * pm_wakeup_dev_event - Notify the PM core of a wakeup event.
826 * @dev: Device the wakeup event is related to.
830 * Call pm_wakeup_ws_event() for the @dev's wakeup source object.
840 pm_wakeup_ws_event(dev->power.wakeup, msec, hard); in pm_wakeup_dev_event()
854 pm_pr_dbg("active wakeup source: %s\n", ws->name); in pm_print_active_wakeup_sources()
865 pm_pr_dbg("last active wakeup source: %s\n", in pm_print_active_wakeup_sources()
874 * Compare the current number of registered wakeup events with its preserved
875 * value from the past and return true if new wakeup events have been registered
877 * wakeup events being processed is different from zero.
895 pm_pr_dbg("Wakeup pending, aborting suspend\n"); in pm_wakeup_pending()
945 pm_pr_dbg("Triggering wakeup from IRQ %d\n", irq_number); in pm_system_irq_wakeup()
959 * pm_get_wakeup_count - Read the number of registered wakeup events.
963 * Store the number of registered wakeup events at the address in @count. If
964 * @block is set, block until the current number of wakeup events being
967 * Return 'false' if the current number of wakeup events being processed is
995 * pm_save_wakeup_count - Save the current number of registered wakeup events.
996 * @count: Value to compare with the current number of registered wakeup events.
998 * If @count is equal to the current number of registered wakeup events and the
999 * current number of wakeup events being processed is zero, store @count as the
1000 * old number of registered wakeup events for pm_check_wakeup_events(), enable
1001 * wakeup events detection and return 'true'. Otherwise disable wakeup events
1022 * pm_wakep_autosleep_enabled - Modify autosleep_enabled for all wakeup sources.
1050 * print_wakeup_source_stats - Print wakeup source statistics information.
1052 * @ws: Wakeup source object to print the statistics for.
1146 * wakeup_sources_stats_seq_show - Print wakeup sources statistics information.