1971cb7fbSRafael J. WysockiWhat: /sys/devices/.../power/ 2971cb7fbSRafael J. WysockiDate: January 2009 3971cb7fbSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 4971cb7fbSRafael J. WysockiDescription: 5971cb7fbSRafael J. Wysocki The /sys/devices/.../power directory contains attributes 6971cb7fbSRafael J. Wysocki allowing the user space to check and modify some power 7971cb7fbSRafael J. Wysocki management related properties of given device. 8971cb7fbSRafael J. Wysocki 9971cb7fbSRafael J. WysockiWhat: /sys/devices/.../power/wakeup 10971cb7fbSRafael J. WysockiDate: January 2009 11971cb7fbSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 12971cb7fbSRafael J. WysockiDescription: 13971cb7fbSRafael J. Wysocki The /sys/devices/.../power/wakeup attribute allows the user 14971cb7fbSRafael J. Wysocki space to check if the device is enabled to wake up the system 15971cb7fbSRafael J. Wysocki from sleep states, such as the memory sleep state (suspend to 16971cb7fbSRafael J. Wysocki RAM) and hibernation (suspend to disk), and to enable or disable 17971cb7fbSRafael J. Wysocki it to do that as desired. 18971cb7fbSRafael J. Wysocki 19971cb7fbSRafael J. Wysocki Some devices support "wakeup" events, which are hardware signals 20971cb7fbSRafael J. Wysocki used to activate the system from a sleep state. Such devices 21971cb7fbSRafael J. Wysocki have one of the following two values for the sysfs power/wakeup 22971cb7fbSRafael J. Wysocki file: 23971cb7fbSRafael J. Wysocki 24971cb7fbSRafael J. Wysocki + "enabled\n" to issue the events; 25971cb7fbSRafael J. Wysocki + "disabled\n" not to do so; 26971cb7fbSRafael J. Wysocki 27971cb7fbSRafael J. Wysocki In that cases the user space can change the setting represented 28971cb7fbSRafael J. Wysocki by the contents of this file by writing either "enabled", or 29971cb7fbSRafael J. Wysocki "disabled" to it. 30971cb7fbSRafael J. Wysocki 31971cb7fbSRafael J. Wysocki For the devices that are not capable of generating system wakeup 32971cb7fbSRafael J. Wysocki events this file contains "\n". In that cases the user space 33971cb7fbSRafael J. Wysocki cannot modify the contents of this file and the device cannot be 34971cb7fbSRafael J. Wysocki enabled to wake up the system. 35971cb7fbSRafael J. Wysocki 36971cb7fbSRafael J. WysockiWhat: /sys/devices/.../power/control 37971cb7fbSRafael J. WysockiDate: January 2009 38971cb7fbSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 39971cb7fbSRafael J. WysockiDescription: 40971cb7fbSRafael J. Wysocki The /sys/devices/.../power/control attribute allows the user 41971cb7fbSRafael J. Wysocki space to control the run-time power management of the device. 42971cb7fbSRafael J. Wysocki 43971cb7fbSRafael J. Wysocki All devices have one of the following two values for the 44971cb7fbSRafael J. Wysocki power/control file: 45971cb7fbSRafael J. Wysocki 46971cb7fbSRafael J. Wysocki + "auto\n" to allow the device to be power managed at run time; 47971cb7fbSRafael J. Wysocki + "on\n" to prevent the device from being power managed; 48971cb7fbSRafael J. Wysocki 49971cb7fbSRafael J. Wysocki The default for all devices is "auto", which means that they may 50971cb7fbSRafael J. Wysocki be subject to automatic power management, depending on their 51971cb7fbSRafael J. Wysocki drivers. Changing this attribute to "on" prevents the driver 52971cb7fbSRafael J. Wysocki from power managing the device at run time. Doing that while 53971cb7fbSRafael J. Wysocki the device is suspended causes it to be woken up. 545a2eb858SRafael J. Wysocki 555a2eb858SRafael J. WysockiWhat: /sys/devices/.../power/async 565a2eb858SRafael J. WysockiDate: January 2009 575a2eb858SRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 585a2eb858SRafael J. WysockiDescription: 595a2eb858SRafael J. Wysocki The /sys/devices/.../async attribute allows the user space to 605a2eb858SRafael J. Wysocki enable or diasble the device's suspend and resume callbacks to 615a2eb858SRafael J. Wysocki be executed asynchronously (ie. in separate threads, in parallel 625a2eb858SRafael J. Wysocki with the main suspend/resume thread) during system-wide power 635a2eb858SRafael J. Wysocki transitions (eg. suspend to RAM, hibernation). 645a2eb858SRafael J. Wysocki 655a2eb858SRafael J. Wysocki All devices have one of the following two values for the 665a2eb858SRafael J. Wysocki power/async file: 675a2eb858SRafael J. Wysocki 685a2eb858SRafael J. Wysocki + "enabled\n" to permit the asynchronous suspend/resume; 695a2eb858SRafael J. Wysocki + "disabled\n" to forbid it; 705a2eb858SRafael J. Wysocki 715a2eb858SRafael J. Wysocki The value of this attribute may be changed by writing either 725a2eb858SRafael J. Wysocki "enabled", or "disabled" to it. 735a2eb858SRafael J. Wysocki 745a2eb858SRafael J. Wysocki It generally is unsafe to permit the asynchronous suspend/resume 755a2eb858SRafael J. Wysocki of a device unless it is certain that all of the PM dependencies 765a2eb858SRafael J. Wysocki of the device are known to the PM core. However, for some 775a2eb858SRafael J. Wysocki devices this attribute is set to "enabled" by bus type code or 785a2eb858SRafael J. Wysocki device drivers and in that cases it should be safe to leave the 795a2eb858SRafael J. Wysocki default value. 80*074037ecSRafael J. Wysocki 81*074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_count 82*074037ecSRafael J. WysockiDate: September 2010 83*074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 84*074037ecSRafael J. WysockiDescription: 85*074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_count attribute contains the number 86*074037ecSRafael J. Wysocki of signaled wakeup events associated with the device. This 87*074037ecSRafael J. Wysocki attribute is read-only. If the device is not enabled to wake up 88*074037ecSRafael J. Wysocki the system from sleep states, this attribute is empty. 89*074037ecSRafael J. Wysocki 90*074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_active_count 91*074037ecSRafael J. WysockiDate: September 2010 92*074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 93*074037ecSRafael J. WysockiDescription: 94*074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_active_count attribute contains the 95*074037ecSRafael J. Wysocki number of times the processing of wakeup events associated with 96*074037ecSRafael J. Wysocki the device was completed (at the kernel level). This attribute 97*074037ecSRafael J. Wysocki is read-only. If the device is not enabled to wake up the 98*074037ecSRafael J. Wysocki system from sleep states, this attribute is empty. 99*074037ecSRafael J. Wysocki 100*074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_hit_count 101*074037ecSRafael J. WysockiDate: September 2010 102*074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 103*074037ecSRafael J. WysockiDescription: 104*074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_hit_count attribute contains the 105*074037ecSRafael J. Wysocki number of times the processing of a wakeup event associated with 106*074037ecSRafael J. Wysocki the device might prevent the system from entering a sleep state. 107*074037ecSRafael J. Wysocki This attribute is read-only. If the device is not enabled to 108*074037ecSRafael J. Wysocki wake up the system from sleep states, this attribute is empty. 109*074037ecSRafael J. Wysocki 110*074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_active 111*074037ecSRafael J. WysockiDate: September 2010 112*074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 113*074037ecSRafael J. WysockiDescription: 114*074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_active attribute contains either 1, 115*074037ecSRafael J. Wysocki or 0, depending on whether or not a wakeup event associated with 116*074037ecSRafael J. Wysocki the device is being processed (1). This attribute is read-only. 117*074037ecSRafael J. Wysocki If the device is not enabled to wake up the system from sleep 118*074037ecSRafael J. Wysocki states, this attribute is empty. 119*074037ecSRafael J. Wysocki 120*074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_total_time_ms 121*074037ecSRafael J. WysockiDate: September 2010 122*074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 123*074037ecSRafael J. WysockiDescription: 124*074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_total_time_ms attribute contains 125*074037ecSRafael J. Wysocki the total time of processing wakeup events associated with the 126*074037ecSRafael J. Wysocki device, in milliseconds. This attribute is read-only. If the 127*074037ecSRafael J. Wysocki device is not enabled to wake up the system from sleep states, 128*074037ecSRafael J. Wysocki this attribute is empty. 129*074037ecSRafael J. Wysocki 130*074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_max_time_ms 131*074037ecSRafael J. WysockiDate: September 2010 132*074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 133*074037ecSRafael J. WysockiDescription: 134*074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_max_time_ms attribute contains 135*074037ecSRafael J. Wysocki the maximum time of processing a single wakeup event associated 136*074037ecSRafael J. Wysocki with the device, in milliseconds. This attribute is read-only. 137*074037ecSRafael J. Wysocki If the device is not enabled to wake up the system from sleep 138*074037ecSRafael J. Wysocki states, this attribute is empty. 139*074037ecSRafael J. Wysocki 140*074037ecSRafael J. WysockiWhat: /sys/devices/.../power/wakeup_last_time_ms 141*074037ecSRafael J. WysockiDate: September 2010 142*074037ecSRafael J. WysockiContact: Rafael J. Wysocki <rjw@sisk.pl> 143*074037ecSRafael J. WysockiDescription: 144*074037ecSRafael J. Wysocki The /sys/devices/.../wakeup_last_time_ms attribute contains 145*074037ecSRafael J. Wysocki the value of the monotonic clock corresponding to the time of 146*074037ecSRafael J. Wysocki signaling the last wakeup event associated with the device, in 147*074037ecSRafael J. Wysocki milliseconds. This attribute is read-only. If the device is 148*074037ecSRafael J. Wysocki not enabled to wake up the system from sleep states, this 149*074037ecSRafael J. Wysocki attribute is empty. 150