Lines Matching full:wakeup
2 * drivers/base/power/wakeup.c - System wakeup events framework
29 * if wakeup events are registered during or immediately before the transition.
33 /* First wakeup IRQ seen by the kernel in the last cycle. */
40 * Combined counters of registered wakeup events and wakeup events in progress.
76 * wakeup_source_prepare - Prepare a new wakeup source for initialization.
77 * @ws: Wakeup source to prepare.
78 * @name: Pointer to the name of the new wakeup source.
94 * @name: Name of the new wakeup source.
111 * @ws: Wakeup source to prepare for destruction.
114 * be run in parallel with this function for the same wakeup source object.
155 * @ws: Wakeup source to destroy.
157 * Use only for wakeup source objects created with wakeup_source_create().
172 * wakeup_source_add - Add given object to the list of wakeup sources.
173 * @ws: Wakeup source object to add to the list.
193 * wakeup_source_remove - Remove given object from the wakeup sources list.
194 * @ws: Wakeup source object to remove from the list.
211 * this wakeup source as not registered. in wakeup_source_remove()
218 * wakeup_source_register - Create wakeup source and add it to the list.
219 * @name: Name of the wakeup source to register.
234 * wakeup_source_unregister - Remove wakeup source from the list and remove it.
235 * @ws: Wakeup source object to unregister.
247 * device_wakeup_attach - Attach a wakeup source object to a device object.
249 * @ws: Wakeup source object to attach to @dev.
251 * This causes @dev to be treated as a wakeup device.
256 if (dev->power.wakeup) { in device_wakeup_attach()
260 dev->power.wakeup = ws; in device_wakeup_attach()
268 * device_wakeup_enable - Enable given device to be a wakeup source.
271 * Create a wakeup source object, register it and attach it to @dev.
297 * device_wakeup_attach_irq - Attach a wakeirq to a wakeup source
301 * Attach a device wakeirq to the wakeup source so the device
312 ws = dev->power.wakeup; in device_wakeup_attach_irq()
317 dev_err(dev, "Leftover wakeup IRQ found, overriding\n"); in device_wakeup_attach_irq()
323 * device_wakeup_detach_irq - Detach a wakeirq from a wakeup source
326 * Removes a device wakeirq from the wakeup source.
334 ws = dev->power.wakeup; in device_wakeup_detach_irq()
372 * device_wakeup_detach - Detach a device's wakeup source object from it.
373 * @dev: Device to detach the wakeup source object from.
375 * After it returns, @dev will not be treated as a wakeup device any more.
382 ws = dev->power.wakeup; in device_wakeup_detach()
383 dev->power.wakeup = NULL; in device_wakeup_detach()
389 * device_wakeup_disable - Do not regard a device as a wakeup source any more.
392 * Detach the @dev's wakeup source object from it, unregister this wakeup source
409 * device_set_wakeup_capable - Set/reset device wakeup capability flag.
414 * wakeup-related attributes to sysfs. Otherwise, unset the @dev's
415 * power.can_wakeup flag and remove its wakeup-related attributes from sysfs.
431 dev_info(dev, "Wakeup sysfs attributes not added\n"); in device_set_wakeup_capable()
440 * device_init_wakeup - Device wakeup initialization.
442 * @enable: Whether or not to enable @dev as a wakeup device.
444 * By default, most devices should leave wakeup disabled. The exceptions are
445 * devices that everyone expects to be wakeup sources: keyboards, power buttons,
447 * own wakeup requests but merely forward requests from one bus to another
448 * (like PCI bridges) should have wakeup enabled by default.
480 * wakeup_source_not_registered - validate the given wakeup source.
481 * @ws: Wakeup source to be validated.
493 * The functions below use the observation that each wakeup event starts a
495 * will end depends on how the wakeup event is going to be processed after being
499 * First, a wakeup event may be detected by the same functional unit that will
507 * Second, a wakeup event may be detected by one functional unit and processed
521 * wakup_source_activate - Mark given wakeup source as active.
522 * @ws: Wakeup source to handle.
525 * core of the event by incrementing the counter of of wakeup events being
533 "unregistered wakeup source\n")) in wakeup_source_activate()
549 * wakeup_source_report_event - Report wakeup event using the given source.
550 * @ws: Wakeup source to report the event for.
568 * __pm_stay_awake - Notify the PM core of a wakeup event.
569 * @ws: Wakeup source object associated with the source of the event.
591 * pm_stay_awake - Notify the PM core that a wakeup event is being processed.
592 * @dev: Device the wakeup event is related to.
594 * Notify the PM core of a wakeup event (signaled by @dev) by calling
595 * __pm_stay_awake for the @dev's wakeup source object.
597 * Call this function after detecting of a wakeup event if pm_relax() is going
609 __pm_stay_awake(dev->power.wakeup); in pm_stay_awake()
626 * wakup_source_deactivate - Mark given wakeup source as inactive.
627 * @ws: Wakeup source to handle.
629 * Update the @ws' statistics and notify the PM core that the wakeup source has
630 * become inactive by decrementing the counter of wakeup events being processed
631 * and incrementing the counter of registered wakeup events.
670 * Increment the counter of registered wakeup events and decrement the in wakeup_source_deactivate()
671 * couter of wakeup events in progress simultaneously. in wakeup_source_deactivate()
682 * __pm_relax - Notify the PM core that processing of a wakeup event has ended.
683 * @ws: Wakeup source object associated with the source of the event.
685 * Call this function for wakeup events whose processing started with calling
705 * pm_relax - Notify the PM core that processing of a wakeup event has ended.
708 * Execute __pm_relax() for the @dev's wakeup source object.
718 __pm_relax(dev->power.wakeup); in pm_relax()
724 * pm_wakeup_timer_fn - Delayed finalization of a wakeup event.
725 * @data: Address of the wakeup source object associated with the event source.
727 * Call wakeup_source_deactivate() for the wakeup source whose address is stored
748 * pm_wakeup_ws_event - Notify the PM core of a wakeup event.
749 * @ws: Wakeup source object associated with the event source.
753 * Notify the PM core of a wakeup event whose source is @ws that will take
792 * pm_wakeup_event - Notify the PM core of a wakeup event.
793 * @dev: Device the wakeup event is related to.
797 * Call pm_wakeup_ws_event() for the @dev's wakeup source object.
807 pm_wakeup_ws_event(dev->power.wakeup, msec, hard); in pm_wakeup_dev_event()
821 pr_debug("active wakeup source: %s\n", ws->name); in pm_print_active_wakeup_sources()
832 pr_debug("last active wakeup source: %s\n", in pm_print_active_wakeup_sources()
841 * Compare the current number of registered wakeup events with its preserved
842 * value from the past and return true if new wakeup events have been registered
844 * wakeup events being processed is different from zero.
862 pr_debug("PM: Wakeup pending, aborting suspend\n"); in pm_wakeup_pending()
897 * pm_get_wakeup_count - Read the number of registered wakeup events.
901 * Store the number of registered wakeup events at the address in @count. If
902 * @block is set, block until the current number of wakeup events being
905 * Return 'false' if the current number of wakeup events being processed is
933 * pm_save_wakeup_count - Save the current number of registered wakeup events.
934 * @count: Value to compare with the current number of registered wakeup events.
936 * If @count is equal to the current number of registered wakeup events and the
937 * current number of wakeup events being processed is zero, store @count as the
938 * old number of registered wakeup events for pm_check_wakeup_events(), enable
939 * wakeup events detection and return 'true'. Otherwise disable wakeup events
960 * pm_wakep_autosleep_enabled - Modify autosleep_enabled for all wakeup sources.
990 * print_wakeup_source_stats - Print wakeup source statistics information.
992 * @ws: Wakeup source object to print the statistics for.
1083 * wakeup_sources_stats_seq_show - Print wakeup sources statistics information.