Re: [PATCH 06/15] iio: adc: ad7923: add the AD7927 to the SPI ID table
From: Nuno Sá
Date: Wed Oct 28 2026 - 05:38:02 EST
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>
> 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
>