lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251030144319.671368a2@bootlin.com>
Date: Thu, 30 Oct 2025 14:43:19 +0100
From: Herve Codina <herve.codina@...tlin.com>
To: Alexander Sverdlin <alexander.sverdlin@...il.com>, Mark Brown
 <broonie@...nel.org>
Cc: David Rhodes	 <david.rhodes@...rus.com>, Richard Fitzgerald
 <rf@...nsource.cirrus.com>, Liam Girdwood <lgirdwood@...il.com>, Rob
 Herring <robh@...nel.org>, Krzysztof Kozlowski	 <krzk+dt@...nel.org>, Conor
 Dooley <conor+dt@...nel.org>, Jaroslav Kysela	 <perex@...ex.cz>, Takashi
 Iwai <tiwai@...e.com>, Nikita Shubin	 <nikita.shubin@...uefel.me>, Axel Lin
 <axel.lin@...ics.com>, Brian Austin	 <brian.austin@...rus.com>,
 linux-sound@...r.kernel.org, patches@...nsource.cirrus.com,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, Thomas Petazzoni
  <thomas.petazzoni@...tlin.com>, stable@...r.kernel.org
Subject: Re: [PATCH v2 1/4] ASoC: cs4271: Fix cs4271 I2C and SPI drivers
 automatic module loading

Hi Alexander,

On Wed, 29 Oct 2025 12:20:27 +0100
Alexander Sverdlin <alexander.sverdlin@...il.com> wrote:

...

> > diff --git a/sound/soc/codecs/cs4271-spi.c b/sound/soc/codecs/cs4271-spi.c
> > index 4feb80436bd9..28dd7b8f3507 100644
> > --- a/sound/soc/codecs/cs4271-spi.c
> > +++ b/sound/soc/codecs/cs4271-spi.c
> > @@ -23,11 +23,24 @@ static int cs4271_spi_probe(struct spi_device *spi)
> >  	return cs4271_probe(&spi->dev, devm_regmap_init_spi(spi, &config));
> >  }
> >  
> > +static const struct spi_device_id cs4271_id_spi[] = {
> > +	{ "cs4271", 0 },
> > +	{}
> > +};
> > +MODULE_DEVICE_TABLE(spi, cs4271_id_spi);
> > +
> > +static const struct of_device_id cs4271_dt_ids[] = {
> > +	{ .compatible = "cirrus,cs4271", },
> > +	{ }
> > +};
> > +MODULE_DEVICE_TABLE(of, cs4271_dt_ids);  
> 
> So currently SPI core doesn't generate "of:" prefixed uevents, therefore this
> currently doesn't help? However, imagine, you'd have both backends enabled
> as modules, -spi and -i2c. udev/modprobe currently load just one module it
> finds first. What is the guarantee that the loaded module for the "of:"
> prefixed I2C uevent would be the -i2c module?
> 

I hesitate to fully remove cs4271_dt_ids in the SPI part.

I understood having it could lead to issues if both SPI and I2C parts
are compiled as modules but this is the pattern used in quite a lot of
drivers.

Maybe this could be handle globally out of this series instead of introducing
a specific pattern in this series.

But well, if you and Mark are ok to fully remove the cs4271_dt_ids from the
SPI part and so unset the of_match_table from the cs4271_spi_driver, I can
do the modification.

Let me know if I should send a new iteration with cs4271_dt_ids fully removed
from the SPI part.

Also, last point, I don't have any cs4271 connected to a SPI bus.
I use only the I2C version and will not be able to check for correct
modifications on the SPI part.

Best regards,
Hervé

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ