Skip to content

Commit

Permalink
platform/chrome: cros_ec_lightbar: Set PROBE_PREFER_ASYNCHRONOUS
Browse files Browse the repository at this point in the history
This driver takes on the order of 15ms to start on some systems. Even on
systems where there is no lightbar support, it can take a few
milliseconds just to probe the EC for support. It shouldn't have many
cross-device dependencies to race with, nor racy access to shared state
with other drivers, so this should be a relatively low risk change.

This driver was pinpointed as part of a survey of top slowest initcalls
(i.e., are built in, and probing synchronously) on a lab of ChromeOS
systems.

Signed-off-by: Brian Norris <[email protected]>
Signed-off-by: Tzung-Bi Shih <[email protected]>
Link: https://lore.kernel.org/r/20221101152132.v2.4.I565598102e0bfb03bdf8c090d3bfdf954d026bc5@changeid
  • Loading branch information
computersforpeace authored and Tzung-Bi Shih committed Nov 2, 2022
1 parent 692a68a commit 873ab3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/platform/chrome/cros_ec_lightbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ static struct platform_driver cros_ec_lightbar_driver = {
.driver = {
.name = DRV_NAME,
.pm = &cros_ec_lightbar_pm_ops,
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
.probe = cros_ec_lightbar_probe,
.remove = cros_ec_lightbar_remove,
Expand Down

0 comments on commit 873ab3e

Please sign in to comment.