diff options
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/power/devices.txt | 67 | ||||
| -rw-r--r-- | Documentation/power/runtime_pm.txt | 5 | ||||
| -rw-r--r-- | Documentation/usb/error-codes.txt | 9 |
3 files changed, 22 insertions, 59 deletions
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index 88880839ece4..64565aac6e40 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
| @@ -520,59 +520,20 @@ Support for power domains is provided through the pwr_domain field of struct | |||
| 520 | device. This field is a pointer to an object of type struct dev_power_domain, | 520 | device. This field is a pointer to an object of type struct dev_power_domain, |
| 521 | defined in include/linux/pm.h, providing a set of power management callbacks | 521 | defined in include/linux/pm.h, providing a set of power management callbacks |
| 522 | analogous to the subsystem-level and device driver callbacks that are executed | 522 | analogous to the subsystem-level and device driver callbacks that are executed |
| 523 | for the given device during all power transitions, in addition to the respective | 523 | for the given device during all power transitions, instead of the respective |
| 524 | subsystem-level callbacks. Specifically, the power domain "suspend" callbacks | 524 | subsystem-level callbacks. Specifically, if a device's pm_domain pointer is |
| 525 | (i.e. ->runtime_suspend(), ->suspend(), ->freeze(), ->poweroff(), etc.) are | 525 | not NULL, the ->suspend() callback from the object pointed to by it will be |
| 526 | executed after the analogous subsystem-level callbacks, while the power domain | 526 | executed instead of its subsystem's (e.g. bus type's) ->suspend() callback and |
| 527 | "resume" callbacks (i.e. ->runtime_resume(), ->resume(), ->thaw(), ->restore, | 527 | anlogously for all of the remaining callbacks. In other words, power management |
| 528 | etc.) are executed before the analogous subsystem-level callbacks. Error codes | 528 | domain callbacks, if defined for the given device, always take precedence over |
| 529 | returned by the "suspend" and "resume" power domain callbacks are ignored. | 529 | the callbacks provided by the device's subsystem (e.g. bus type). |
| 530 | 530 | ||
| 531 | Power domain ->runtime_idle() callback is executed before the subsystem-level | 531 | The support for device power management domains is only relevant to platforms |
| 532 | ->runtime_idle() callback and the result returned by it is not ignored. Namely, | 532 | needing to use the same device driver power management callbacks in many |
| 533 | if it returns error code, the subsystem-level ->runtime_idle() callback will not | 533 | different power domain configurations and wanting to avoid incorporating the |
| 534 | be called and the helper function rpm_idle() executing it will return error | 534 | support for power domains into subsystem-level callbacks, for example by |
| 535 | code. This mechanism is intended to help platforms where saving device state | 535 | modifying the platform bus type. Other platforms need not implement it or take |
| 536 | is a time consuming operation and should only be carried out if all devices | 536 | it into account in any way. |
| 537 | in the power domain are idle, before turning off the shared power resource(s). | ||
| 538 | Namely, the power domain ->runtime_idle() callback may return error code until | ||
| 539 | the pm_runtime_idle() helper (or its asychronous version) has been called for | ||
| 540 | all devices in the power domain (it is recommended that the returned error code | ||
| 541 | be -EBUSY in those cases), preventing the subsystem-level ->runtime_idle() | ||
| 542 | callback from being run prematurely. | ||
| 543 | |||
| 544 | The support for device power domains is only relevant to platforms needing to | ||
| 545 | use the same subsystem-level (e.g. platform bus type) and device driver power | ||
| 546 | management callbacks in many different power domain configurations and wanting | ||
| 547 | to avoid incorporating the support for power domains into the subsystem-level | ||
| 548 | callbacks. The other platforms need not implement it or take it into account | ||
| 549 | in any way. | ||
| 550 | |||
| 551 | |||
| 552 | System Devices | ||
| 553 | -------------- | ||
| 554 | System devices (sysdevs) follow a slightly different API, which can be found in | ||
| 555 | |||
| 556 | include/linux/sysdev.h | ||
| 557 | drivers/base/sys.c | ||
| 558 | |||
| 559 | System devices will be suspended with interrupts disabled, and after all other | ||
| 560 | devices have been suspended. On resume, they will be resumed before any other | ||
| 561 | devices, and also with interrupts disabled. These things occur in special | ||
| 562 | "sysdev_driver" phases, which affect only system devices. | ||
| 563 | |||
| 564 | Thus, after the suspend_noirq (or freeze_noirq or poweroff_noirq) phase, when | ||
| 565 | the non-boot CPUs are all offline and IRQs are disabled on the remaining online | ||
| 566 | CPU, then a sysdev_driver.suspend phase is carried out, and the system enters a | ||
| 567 | sleep state (or a system image is created). During resume (or after the image | ||
| 568 | has been created or loaded) a sysdev_driver.resume phase is carried out, IRQs | ||
| 569 | are enabled on the only online CPU, the non-boot CPUs are enabled, and the | ||
| 570 | resume_noirq (or thaw_noirq or restore_noirq) phase begins. | ||
| 571 | |||
| 572 | Code to actually enter and exit the system-wide low power state sometimes | ||
| 573 | involves hardware details that are only known to the boot firmware, and | ||
| 574 | may leave a CPU running software (from SRAM or flash memory) that monitors | ||
| 575 | the system and manages its wakeup sequence. | ||
| 576 | 537 | ||
| 577 | 538 | ||
| 578 | Device Low Power (suspend) States | 539 | Device Low Power (suspend) States |
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 654097b130b4..22accb3eb40e 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
| @@ -566,11 +566,6 @@ to do this is: | |||
| 566 | pm_runtime_set_active(dev); | 566 | pm_runtime_set_active(dev); |
| 567 | pm_runtime_enable(dev); | 567 | pm_runtime_enable(dev); |
| 568 | 568 | ||
| 569 | The PM core always increments the run-time usage counter before calling the | ||
| 570 | ->prepare() callback and decrements it after calling the ->complete() callback. | ||
| 571 | Hence disabling run-time PM temporarily like this will not cause any run-time | ||
| 572 | suspend callbacks to be lost. | ||
| 573 | |||
| 574 | 7. Generic subsystem callbacks | 569 | 7. Generic subsystem callbacks |
| 575 | 570 | ||
| 576 | Subsystems may wish to conserve code space by using the set of generic power | 571 | Subsystems may wish to conserve code space by using the set of generic power |
diff --git a/Documentation/usb/error-codes.txt b/Documentation/usb/error-codes.txt index d83703ea74b2..b3f606b81a03 100644 --- a/Documentation/usb/error-codes.txt +++ b/Documentation/usb/error-codes.txt | |||
| @@ -76,6 +76,13 @@ A transfer's actual_length may be positive even when an error has been | |||
| 76 | reported. That's because transfers often involve several packets, so that | 76 | reported. That's because transfers often involve several packets, so that |
| 77 | one or more packets could finish before an error stops further endpoint I/O. | 77 | one or more packets could finish before an error stops further endpoint I/O. |
| 78 | 78 | ||
| 79 | For isochronous URBs, the urb status value is non-zero only if the URB is | ||
| 80 | unlinked, the device is removed, the host controller is disabled, or the total | ||
| 81 | transferred length is less than the requested length and the URB_SHORT_NOT_OK | ||
| 82 | flag is set. Completion handlers for isochronous URBs should only see | ||
| 83 | urb->status set to zero, -ENOENT, -ECONNRESET, -ESHUTDOWN, or -EREMOTEIO. | ||
| 84 | Individual frame descriptor status fields may report more status codes. | ||
| 85 | |||
| 79 | 86 | ||
| 80 | 0 Transfer completed successfully | 87 | 0 Transfer completed successfully |
| 81 | 88 | ||
| @@ -132,7 +139,7 @@ one or more packets could finish before an error stops further endpoint I/O. | |||
| 132 | device removal events immediately. | 139 | device removal events immediately. |
| 133 | 140 | ||
| 134 | -EXDEV ISO transfer only partially completed | 141 | -EXDEV ISO transfer only partially completed |
| 135 | look at individual frame status for details | 142 | (only set in iso_frame_desc[n].status, not urb->status) |
| 136 | 143 | ||
| 137 | -EINVAL ISO madness, if this happens: Log off and go home | 144 | -EINVAL ISO madness, if this happens: Log off and go home |
| 138 | 145 | ||
