Skip to content

Commit

Permalink
regulator: core: Disable unused regulators after deferred probing is …
Browse files Browse the repository at this point in the history
…done

regulator_init_complete does a scan of regulators which dont have
always-on or consumers are automatically disabled as being unused.
However, with deferred probing, late_initcall() is too soon to
declare a regulator as unused as the regulator itself might not
have registered due to defferal - Example: A regulator deffered due
to i2bus not available which in turn is deffered due to pinctrl
availability.

Since deferred probing is done in late_initcall(), do the cleanup of
unused regulators by regulator_init_complete in late_initcall_sync
instead of late_initcall.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
[nm@ti.com: minor rewording]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Saravana Kannan authored and Mark Brown committed Jun 1, 2014
1 parent e953583 commit fd482a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3871,4 +3871,4 @@ static int __init regulator_init_complete(void)

return 0;
}
late_initcall(regulator_init_complete);
late_initcall_sync(regulator_init_complete);

0 comments on commit fd482a3

Please sign in to comment.