Lines Matching +full:power +full:- +full:source
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * pm_wakeup.h - Power management wakeup interface
21 * struct wakeup_source - Representation of wakeup sources
23 * @name: Name of the wakeup source
24 * @id: Wakeup source id
25 * @entry: Wakeup source list entry
26 * @lock: Wakeup source lock
30 * @total_time: Total time this wakeup source has been active.
31 * @max_time: Maximum time this wakeup source has been continuously active.
32 * @last_time: Monotonic clock when the wakeup source's was touched last time.
33 * @prevent_sleep_time: Total time this source has been preventing autosleep.
35 * @active_count: Number of times the wakeup source was activated.
36 * @relax_count: Number of times the wakeup source was deactivated.
37 * @expire_count: Number of times the wakeup source's timeout has expired.
38 * @wakeup_count: Number of times the wakeup source might abort suspend.
39 * @dev: Struct device for sysfs statistics about the wakeup source.
40 * @active: Status of the wakeup source.
79 return dev->power.can_wakeup; in device_can_wakeup()
84 return dev->power.can_wakeup && !!dev->power.wakeup; in device_may_wakeup()
89 return dev->power.wakeup_path; in device_wakeup_path()
94 dev->power.wakeup_path = true; in device_set_wakeup_path()
97 /* drivers/base/power/wakeup.c */
124 dev->power.can_wakeup = capable; in device_set_wakeup_capable()
129 return dev->power.can_wakeup; in device_can_wakeup()
153 dev->power.should_wakeup = true; in device_wakeup_enable()
159 dev->power.should_wakeup = false; in device_wakeup_disable()
164 dev->power.should_wakeup = enable; in device_set_wakeup_enable()
170 return dev->power.can_wakeup && dev->power.should_wakeup; in device_may_wakeup()
222 * device_init_wakeup - Device wakeup initialization.
227 * devices that everyone expects to be wakeup sources: keyboards, power buttons,