diff options
Diffstat (limited to 'Documentation/power/devices.txt')
-rw-r--r-- | Documentation/power/devices.txt | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index 57080cd74575..dd9b49251db3 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
@@ -159,18 +159,18 @@ matter, and the kernel is responsible for keeping track of it. By contrast, | |||
159 | whether or not a wakeup-capable device should issue wakeup events is a policy | 159 | whether or not a wakeup-capable device should issue wakeup events is a policy |
160 | decision, and it is managed by user space through a sysfs attribute: the | 160 | decision, and it is managed by user space through a sysfs attribute: the |
161 | power/wakeup file. User space can write the strings "enabled" or "disabled" to | 161 | power/wakeup file. User space can write the strings "enabled" or "disabled" to |
162 | set or clear the should_wakeup flag, respectively. Reads from the file will | 162 | set or clear the "should_wakeup" flag, respectively. This file is only present |
163 | return the corresponding string if can_wakeup is true, but if can_wakeup is | 163 | for wakeup-capable devices (i.e. devices whose "can_wakeup" flags are set) |
164 | false then reads will return an empty string, to indicate that the device | 164 | and is created (or removed) by device_set_wakeup_capable(). Reads from the |
165 | doesn't support wakeup events. (But even though the file appears empty, writes | 165 | file will return the corresponding string. |
166 | will still affect the should_wakeup flag.) | ||
167 | 166 | ||
168 | The device_may_wakeup() routine returns true only if both flags are set. | 167 | The device_may_wakeup() routine returns true only if both flags are set. |
169 | Drivers should check this routine when putting devices in a low-power state | 168 | This information is used by subsystems, like the PCI bus type code, to see |
170 | during a system sleep transition, to see whether or not to enable the devices' | 169 | whether or not to enable the devices' wakeup mechanisms. If device wakeup |
171 | wakeup mechanisms. However for runtime power management, wakeup events should | 170 | mechanisms are enabled or disabled directly by drivers, they also should use |
172 | be enabled whenever the device and driver both support them, regardless of the | 171 | device_may_wakeup() to decide what to do during a system sleep transition. |
173 | should_wakeup flag. | 172 | However for runtime power management, wakeup events should be enabled whenever |
173 | the device and driver both support them, regardless of the should_wakeup flag. | ||
174 | 174 | ||
175 | 175 | ||
176 | /sys/devices/.../power/control files | 176 | /sys/devices/.../power/control files |