All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Lee Jones <lee.jones@linaro.org>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Jie Yang <yang.jie@linux.intel.com>,
	Mark Brown <broonie@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
	patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	alsa-devel@alsa-project.org
Subject: [PATCH v4 1/5] mfd: arizona: Add MODULE_SOFTDEP("pre: arizona_ldo1")
Date: Wed, 20 Jan 2021 22:49:53 +0100	[thread overview]
Message-ID: <20210120214957.140232-2-hdegoede@redhat.com> (raw)
In-Reply-To: <20210120214957.140232-1-hdegoede@redhat.com>

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>
---
 drivers/mfd/arizona-i2c.c | 1 +
 drivers/mfd/arizona-spi.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mfd/arizona-i2c.c b/drivers/mfd/arizona-i2c.c
index 4b58e3ad6eb6..2a4a3a164d0a 100644
--- a/drivers/mfd/arizona-i2c.c
+++ b/drivers/mfd/arizona-i2c.c
@@ -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");
diff --git a/drivers/mfd/arizona-spi.c b/drivers/mfd/arizona-spi.c
index 2633e147b76c..704f214d2614 100644
--- a/drivers/mfd/arizona-spi.c
+++ b/drivers/mfd/arizona-spi.c
@@ -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");
-- 
2.28.0


WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede@redhat.com>
To: Lee Jones <lee.jones@linaro.org>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Jie Yang <yang.jie@linux.intel.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
	Hans de Goede <hdegoede@redhat.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: [PATCH v4 1/5] mfd: arizona: Add MODULE_SOFTDEP("pre: arizona_ldo1")
Date: Wed, 20 Jan 2021 22:49:53 +0100	[thread overview]
Message-ID: <20210120214957.140232-2-hdegoede@redhat.com> (raw)
In-Reply-To: <20210120214957.140232-1-hdegoede@redhat.com>

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>
---
 drivers/mfd/arizona-i2c.c | 1 +
 drivers/mfd/arizona-spi.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/mfd/arizona-i2c.c b/drivers/mfd/arizona-i2c.c
index 4b58e3ad6eb6..2a4a3a164d0a 100644
--- a/drivers/mfd/arizona-i2c.c
+++ b/drivers/mfd/arizona-i2c.c
@@ -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");
diff --git a/drivers/mfd/arizona-spi.c b/drivers/mfd/arizona-spi.c
index 2633e147b76c..704f214d2614 100644
--- a/drivers/mfd/arizona-spi.c
+++ b/drivers/mfd/arizona-spi.c
@@ -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");
-- 
2.28.0


  reply	other threads:[~2021-01-20 22:29 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 21:49 [PATCH v4 0/5] MFD/ASoC: Add support for Intel Bay Trail boards with WM5102 codec Hans de Goede
2021-01-20 21:49 ` Hans de Goede
2021-01-20 21:49 ` Hans de Goede [this message]
2021-01-20 21:49   ` [PATCH v4 1/5] mfd: arizona: Add MODULE_SOFTDEP("pre: arizona_ldo1") Hans de Goede
2021-02-04 13:55   ` Lee Jones
2021-02-04 13:55     ` Lee Jones
2021-01-20 21:49 ` [PATCH v4 2/5] mfd: arizona: Replace arizona_of_get_type() with device_get_match_data() Hans de Goede
2021-01-20 21:49   ` Hans de Goede
2021-02-04 13:55   ` Lee Jones
2021-02-04 13:55     ` Lee Jones
2021-01-20 21:49 ` [PATCH v4 3/5] mfd: arizona: Add support for ACPI enumeration of WM5102 connected over SPI Hans de Goede
2021-01-20 21:49   ` Hans de Goede
2021-01-21 10:34   ` Charles Keepax
2021-01-21 10:34     ` Charles Keepax
2021-02-04 13:55   ` Lee Jones
2021-02-04 13:55     ` Lee Jones
2021-01-20 21:49 ` [PATCH v4 4/5] ASoC: Intel: Add DMI quirk table to soc_intel_is_byt_cr() Hans de Goede
2021-01-20 21:49   ` Hans de Goede
2021-02-04 13:56   ` Lee Jones
2021-02-04 13:56     ` Lee Jones
2021-02-04 14:05     ` Mark Brown
2021-02-04 14:05       ` Mark Brown
2021-02-04 15:04       ` Lee Jones
2021-02-04 15:04         ` Lee Jones
2021-02-04 15:11         ` Mark Brown
2021-02-04 15:11           ` Mark Brown
2021-02-04 15:40           ` Lee Jones
2021-02-04 15:40             ` Lee Jones
2021-02-04 19:42             ` Mark Brown
2021-02-04 19:42               ` Mark Brown
2021-02-05  8:34               ` Lee Jones
2021-02-05  8:34                 ` Lee Jones
2021-02-05 21:11                 ` Mark Brown
2021-02-05 21:11                   ` Mark Brown
2021-02-08  8:33                   ` Lee Jones
2021-02-08  8:33                     ` Lee Jones
2021-02-08 15:24                     ` Mark Brown
2021-02-08 15:24                       ` Mark Brown
2021-01-20 21:49 ` [PATCH v4 5/5] ASoC: Intel: bytcr_wm5102: Add machine driver for BYT/WM5102 Hans de Goede
2021-01-20 21:49   ` Hans de Goede
2021-01-21 10:37   ` Charles Keepax
2021-01-21 10:37     ` Charles Keepax
2021-02-04 13:56   ` Lee Jones
2021-02-04 13:56     ` Lee Jones
2021-02-04 10:25 ` [PATCH v4 0/5] MFD/ASoC: Add support for Intel Bay Trail boards with WM5102 codec Hans de Goede
2021-02-04 10:25   ` Hans de Goede
2021-02-04 10:57   ` Lee Jones
2021-02-04 10:57     ` Lee Jones
2021-02-04 11:07     ` Hans de Goede
2021-02-04 11:07       ` Hans de Goede
2021-02-04 12:43       ` Mark Brown
2021-02-04 12:43         ` Mark Brown
2021-02-04 13:18         ` Hans de Goede
2021-02-04 13:18           ` Hans de Goede
2021-02-04 14:04           ` Mark Brown
2021-02-04 14:04             ` Mark Brown
2021-02-04 13:46         ` Lee Jones
2021-02-04 13:46           ` Lee Jones
2021-02-04 15:09           ` Mark Brown
2021-02-04 15:09             ` Mark Brown
2021-02-04 15:21             ` Lee Jones
2021-02-04 15:21               ` Lee Jones
2021-02-04 16:48               ` Mark Brown
2021-02-04 16:48                 ` Mark Brown
2021-02-08 13:52 ` [GIT PULL] Immutable branch from MFD due for the v5.12 merge window Lee Jones
2021-02-08 13:52   ` Lee Jones
2021-02-08 18:38 ` (subset) [PATCH v4 0/5] MFD/ASoC: Add support for Intel Bay Trail boards with WM5102 codec Mark Brown
2021-02-08 18:38   ` Mark Brown
2021-02-08 19:12   ` Hans de Goede
2021-02-08 19:12     ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210120214957.140232-2-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=lee.jones@linaro.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=yang.jie@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.