mfd: arizona: Add MODULE_SOFTDEP("pre: arizona_ldo1")
authorHans de Goede <hdegoede@redhat.com>
Wed, 20 Jan 2021 21:49:53 +0000 (22:49 +0100)
committerLee Jones <lee.jones@linaro.org>
Thu, 4 Feb 2021 13:54:39 +0000 (13:54 +0000)
commit06e577b45db37e8a96ce04e7daa64480492b4ace
tree7035a27f69f868efdff447cf0b36d1e148ed5c5c
parent5c8fe583cce542aa0b84adc939ce85293de36e5e
mfd: arizona: Add MODULE_SOFTDEP("pre: arizona_ldo1")

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>
drivers/mfd/arizona-i2c.c
drivers/mfd/arizona-spi.c