[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <336e169019bd3eadc475c981abef3db07149a5db.camel@gmail.com>
Date: Fri, 17 Oct 2025 17:35:56 +0200
From: Alexander Sverdlin <alexander.sverdlin@...il.com>
To: Herve Codina <herve.codina@...tlin.com>
Cc: David Rhodes <david.rhodes@...rus.com>, Richard Fitzgerald
<rf@...nsource.cirrus.com>, Liam Girdwood <lgirdwood@...il.com>, Mark Brown
<broonie@...nel.org>, 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>
Subject: Re: [PATCH 1/3] ASoC: cs4271: Fix cs4271 I2C and SPI drivers
automatic module loading
Hi Herve,
On Fri, 2025-10-17 at 17:10 +0200, Herve Codina wrote:
> > > > > In order to have the I2C or the SPI module loaded automatically, move
> > > > > the MODULE_DEVICE_TABLE(of, ...) the core to I2C and SPI parts.
> > > > > Also move cs4271_dt_ids itself from the core part to I2C and SPI parts
> > > > > as both the call to MODULE_DEVICE_TABLE(of, ...) and the cs4271_dt_ids
> > > > > table itself need to be in the same file.
> > > >
> > > > I'm a bit confused by this change.
> > > > What do you have in SYSFS "uevent" entry for the real device?
> > >
> > > Here is my uevent content:
> > > --- 8<---
> > > # cat /sys/bus/i2c/devices/3-0010/uevent
> > > DRIVER=cs4271
> > > OF_NAME=cs4271
> > > OF_FULLNAME=/i2c@...30000/cs4271@10
> > > OF_COMPATIBLE_0=cirrus,cs4271
> > > OF_COMPATIBLE_N=1
> > > MODALIAS=of:Ncs4271T(null)Ccirrus,cs4271
> > > #
> > > --- 8< ---
> >
> > that's what I get with SPI-connected CS4271, and this is actually what I'd
> > expect (linux-next as of 2433b8476165):
> >
> > # cat /sys/bus/spi/devices/spi0.0/uevent
> > DRIVER=cs4271
> > OF_NAME=codec
> > OF_FULLNAME=/soc/spi@...a0000/codec@0
> > OF_COMPATIBLE_0=cirrus,cs4271
> > OF_COMPATIBLE_N=1
> > MODALIAS=spi:cs4271
>
> So, this is without my patch applied.
this is the modalias of the device, it doesn't depend on your patch series.
I'd say that modalias for SPI device is correct but commit c973b8a7dc50
lacks MODULE_DEVICE_TABLE(spi, ...) in the driver.
I'd argue that I2C modalias is correct in the driver:
# modinfo snd-soc-cs4271-i2c
...
alias: i2c:cs4271
But I still have to understand what happened to I2C core.
> I don't have any CS4271 connected on SPI bus to perform the same test
> with my patch applied.
--
Alexander Sverdlin.
Powered by blists - more mailing lists