Re: [PATCH 06/15] iio: adc: ad7923: add the AD7927 to the SPI ID table
From: Jonathan Cameron
Date: Sat Oct 31 2026 - 22:23:16 EST
On Wed, 28 Oct 2026 09:35:52 +0000
Nuno Sá <nuno.sa@xxxxxxxxxx> wrote:
> On Tue, Oct 27, 2026 at 05:19:10PM +0100, Greg Kroah-Hartman wrote:
> > From: Josef Bacik <josef@xxxxxxxxxxxxxx>
> >
> > The binding describes the AD7927 as
> >
> > compatible = "adi,ad7927", "adi,ad7928";
> >
> > The OF match takes the second string. The modalias of the SPI device is
> > made from the first one, "ad7927", which is not in the spi_device_id table:
> > spi_get_device_id() returns NULL and ad7923_probe() dereferences it for
> > the chip information. The module is not loaded automatically either, as the
> > uevent of an SPI device says "spi:ad7927".
> >
> > Add the name, with the data of the AD7928.
> >
> > Fixes: 1140f96cd4af ("dt-bindings: iio: adc: ad7923: adjust documentation")
> > Cc: stable <stable@xxxxxxxxxx>
> > Cc: "Nuno Sá" <nuno.sa@xxxxxxxxxx>
> > Cc: Michael Hennerich <Michael.Hennerich@xxxxxxxxxx>
> > Cc: David Lechner <dlechner@xxxxxxxxxxxx>
> > Cc: Andy Shevchenko <andy@xxxxxxxxxx>
> > Cc: Edmund Berenson <edmund.berenson@xxxxxxxxx>
> > Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
> > Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > ---
>
> Reviewed-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
Applied to the fixes-togreg branch of iio.git.
Will rebase that on rc1 once available.
>
> > drivers/iio/adc/ad7923.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/iio/adc/ad7923.c b/drivers/iio/adc/ad7923.c
> > index 44e014da9722..69fafb4aa4ea 100644
> > --- a/drivers/iio/adc/ad7923.c
> > +++ b/drivers/iio/adc/ad7923.c
> > @@ -366,6 +366,7 @@ static const struct spi_device_id ad7923_id[] = {
> > { .name = "ad7924", .driver_data = AD7924 },
> > { .name = "ad7908", .driver_data = AD7908 },
> > { .name = "ad7918", .driver_data = AD7918 },
> > + { .name = "ad7927", .driver_data = AD7928 },
> > { .name = "ad7928", .driver_data = AD7928 },
> > { }
> > };
> >
> > --
> > 2.56.0
> >