Skip to content

Commit f6a2fbb

Browse files
bjdooks-ctrafaeljw
authored andcommitted
PM / runtime: add note about re-calling in during device probe()
The sh_eth driver has come up with an issue where the runtime_pm code suspends it during the probe() method due to the network device registration re-calling into the driver. Add a note about this into the documentation. Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 030bbdb commit f6a2fbb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Documentation/power/runtime_pm.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,12 @@ helper functions described in Section 4. In that case, pm_runtime_resume()
556556
should be used. Of course, for this purpose the device's runtime PM has to be
557557
enabled earlier by calling pm_runtime_enable().
558558

559+
Note, if the device may execute pm_runtime calls during the probe (such as
560+
if it is registers with a subsystem that may call back in) then the
561+
pm_runtime_get_sync() call paired with a pm_runtime_put() call will be
562+
appropriate to ensure that the device is not put back to sleep during the
563+
probe. This can happen with systems such as the network device layer.
564+
559565
It may be desirable to suspend the device once ->probe() has finished.
560566
Therefore the driver core uses the asyncronous pm_request_idle() to submit a
561567
request to execute the subsystem-level idle callback for the device at that

0 commit comments

Comments
 (0)