Skip to content

driver core: Improve and cleanup driver_deferred_probe_check_state()

John Stultz linux-pm linux-renesas-soc lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 12 repliesIn review
  2. v46 patches 14 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6driver core: Fix driver_deferred_probe_check_state() logicdrivers/base/dd.c+10 -81 reply
2/6driver core: Set deferred_probe_timeout to a longer default if CONFIG_MODULES is setdrivers/base/dd.c+9 -00 replies
3/6pinctrl: Remove use of driver_deferred_probe_check_state_continue()drivers/pinctrl/devicetree.c+5 -42 replies
4/6driver core: Remove driver_deferred_probe_check_state_continue()drivers/base/dd.c include/linux/device/driver.h+8 -460 replies
5/6driver core: Rename deferred_probe_timeout and make it globaldrivers/base/dd.c include/linux/device/driver.h+10 -70 replies
6/6regulator: Use driver_deferred_probe_timeout for regulator_init_complete_workdrivers/regulator/core.c+14 -111 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchRafael J. WysockiBjorn AnderssonLinus WalleijMark Brown
1/6R-b
2/6R-b R-b
3/6A-b
4/6R-b R-b
5/6R-b R-b
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/6] driver core: Improve and cleanup driver_deferred_probe_check_state()

This series goal is to improve and cleanup the driver_deferred_probe_check_state() code in the driver core.

This series is useful for being able to support modules dependencies which may be loaded by userland, far after late_initcall is done. For instance, this series allows us to successfully use various clk drivers as modules on the db845c board. And without it, those drivers have to be statically built in to work.

Since I first sent out this patch, Saravana suggested an alternative approach which also works for our needs, and is a bit simpler:
https://lore.kernel.org/lkml/[email protected]/T/#u

However, while that patch provides the functionality we need, I still suspect the driver_deferred_probe_check_state() code could benefit from the cleanup in this patch, as the existing logic is somewhat muddy.

New in v5:
* Reworked the driver_deferred_probe_check_state() logic as suggested by Saravana to tie the initcall_done checking with modules being enabled.
* Cleanup some comment wording as suggested by Rafael
* Try to slightly simplify the regulator logic as suggested by Bjorn

Thanks so much to Bjorn, Saravana and Rafael for their reviews and suggestions! Additional review and feedback is always greatly appreciated!

thanks
-john

Cc Rob Herring <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Ulf Hansson <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Len Brown <[email protected]>
Cc Todd Kjos <[email protected]>
Cc Saravana Kannan <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

John Stultz (6):
driver core: Fix driver_deferred_probe_check_state() logic driver core: Set deferred_probe_timeout to a longer default if
CONFIG_MODULES is set
pinctrl: Remove use of driver_deferred_probe_check_state_continue() driver core: Remove driver_deferred_probe_check_state_continue() driver core: Rename deferred_probe_timeout and make it global
regulator: Use driver_deferred_probe_timeout for
regulator_init_complete_work

 drivers/base/dd.c             | 82 +++++++++++++----------------------
 drivers/pinctrl/devicetree.c  |  9 ++--
 drivers/regulator/core.c      | 25 ++++++-----
 include/linux/device/driver.h |  2 +-
 4 files changed, 49 insertions(+), 69 deletions(-)
Signature · 1 line
2.17.1