linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ASoC: cs42l51: add soft dependency declaration
@ 2020-10-02 15:29 Olivier Moysan
  2020-10-02 15:41 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Olivier Moysan @ 2020-10-02 15:29 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, alexandre.torgue,
	olivier.moysan, arnaud.patard
  Cc: alsa-devel, linux-stm32, linux-arm-kernel, linux-kernel

When configured as module, CS42L51 codec driver uses two modules
snd-soc-cs42l51 and snd-soc-cs42l51-i2c.
Add soft dependency on snd-soc-cs42l51-i2c in snd-soc-cs42l51,
to allow smart module dependency solving.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
---
 sound/soc/codecs/cs42l51.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 097c4e8d9950..1630baad42e2 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -814,4 +814,5 @@ EXPORT_SYMBOL_GPL(cs42l51_of_match);
 
 MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
 MODULE_DESCRIPTION("Cirrus Logic CS42L51 ALSA SoC Codec Driver");
+MODULE_SOFTDEP("pre: snd-soc-cs42l51-i2c");
 MODULE_LICENSE("GPL");
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] ASoC: cs42l51: add soft dependency declaration
  2020-10-02 15:29 [PATCH 1/1] ASoC: cs42l51: add soft dependency declaration Olivier Moysan
@ 2020-10-02 15:41 ` Mark Brown
       [not found]   ` <4e7fb9c0-84ea-ba01-cea8-8044d6ff60de@st.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2020-10-02 15:41 UTC (permalink / raw)
  To: Olivier Moysan
  Cc: alsa-devel, alexandre.torgue, linux-kernel, tiwai, lgirdwood,
	linux-arm-kernel, perex, linux-stm32, arnaud.patard


[-- Attachment #1.1: Type: text/plain, Size: 367 bytes --]

On Fri, Oct 02, 2020 at 05:29:04PM +0200, Olivier Moysan wrote:
> When configured as module, CS42L51 codec driver uses two modules
> snd-soc-cs42l51 and snd-soc-cs42l51-i2c.
> Add soft dependency on snd-soc-cs42l51-i2c in snd-soc-cs42l51,
> to allow smart module dependency solving.

Doesn't the userspace tooling usually manage to figure this out from
symbol usage?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] ASoC: cs42l51: add soft dependency declaration
       [not found]   ` <4e7fb9c0-84ea-ba01-cea8-8044d6ff60de@st.com>
@ 2020-10-05 15:25     ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-10-05 15:25 UTC (permalink / raw)
  To: Olivier MOYSAN
  Cc: alsa-devel, Alexandre TORGUE, linux-kernel, tiwai, lgirdwood,
	linux-arm-kernel, perex, linux-stm32, arnaud.patard


[-- Attachment #1.1: Type: text/plain, Size: 1449 bytes --]

On Mon, Oct 05, 2020 at 03:01:23PM +0000, Olivier MOYSAN wrote:
> On 10/2/20 5:41 PM, Mark Brown wrote:
> 
> On Fri, Oct 02, 2020 at 05:29:04PM +0200, Olivier Moysan wrote:
> 
> 
> When configured as module, CS42L51 codec driver uses two modules
> snd-soc-cs42l51 and snd-soc-cs42l51-i2c.
> Add soft dependency on snd-soc-cs42l51-i2c in snd-soc-cs42l51,
> to allow smart module dependency solving.

Please fix your mail client, the formatting is completely broken -
there's nothing distinguishing quoted and new text and you've got lines
well over 80 columns.

> Doesn't the userspace tooling usually manage to figure this out from
> symbol usage?

> cs42l51.c does not use symbols from cs42l51-i2c.c, so cs42l51-i2c does not appear
> as a software dependency of cs42l51, for tools such as depmod.
> (cs42l51-i2c.c uses symbols from cs42l51.c,
> so there is a dependency in this way, but this does not help here)

But that's the dependency that exists and we want - the I2C driver is
what has the bus bindings in it and will be what we decide to load to
instantiate the device, that will then pull in the core code that it
needs.

> When enabling a sound card based on cs42l51, all required modules are loaded automatically,
> excepted snd-soc-cs42l51-i2c module. This one has to be inserted explicitely.

Whatever is going on here this patch is not addressing it.  Most likely
some ID tables are in the wrong file.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-05 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 15:29 [PATCH 1/1] ASoC: cs42l51: add soft dependency declaration Olivier Moysan
2020-10-02 15:41 ` Mark Brown
     [not found]   ` <4e7fb9c0-84ea-ba01-cea8-8044d6ff60de@st.com>
2020-10-05 15:25     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).