Skip to content

Commit

Permalink
mfd: arizona: Add MODULE_SOFTDEP("pre: arizona_ldo1")
Browse files Browse the repository at this point in the history
The (shared) probing code of the arizona-i2c and arizona-spi modules
takes the following steps during init:

1. Call mfd_add_devices() for a set of early child-devices, this
includes the arizona_ldo1 device which provides one of the
core-regulators.

2. Bulk enable the core-regulators.

3. Read the device id.

4. Call mfd_add_devices() for the other child-devices.

This sequence depends on 1. leading to not only the child-device
being created, but also the driver for the child-device binding
to it and registering its regulator.

This requires the arizona_ldo1 driver to be loaded before the
shared probing code runs. Add a softdep for this to both modules to
ensure that this requirement is met.

Note this mirrors the existing MODULE_SOFTDEP("pre: wm8994_regulator")
in the wm8994 code, which has a similar init sequence.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Hans de Goede authored and Lee Jones committed Feb 4, 2021
1 parent 5c8fe58 commit 06e577b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mfd/arizona-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ static struct i2c_driver arizona_i2c_driver = {

module_i2c_driver(arizona_i2c_driver);

MODULE_SOFTDEP("pre: arizona_ldo1");
MODULE_DESCRIPTION("Arizona I2C bus interface");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");
1 change: 1 addition & 0 deletions drivers/mfd/arizona-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ static struct spi_driver arizona_spi_driver = {

module_spi_driver(arizona_spi_driver);

MODULE_SOFTDEP("pre: arizona_ldo1");
MODULE_DESCRIPTION("Arizona SPI bus interface");
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_LICENSE("GPL");

0 comments on commit 06e577b

Please sign in to comment.