]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
iio: adc: ad9467: refine mismatch vs unknown chip-id messages
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Wed, 16 Sep 2020 08:31:28 +0000 (11:31 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 16 Sep 2020 18:14:17 +0000 (19:14 +0100)
We should probably print what the expected chip-ID is. We already have
that information available, based on the device specified via
device-tree.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20200916083128.73729-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad9467.c

index 1e8fd83b9bc20525087017664ddd6e53fa7cf4c3..9c3ab46e4d88fe026a9d077a720bbf13bde2b5d1 100644 (file)
@@ -390,7 +390,8 @@ static int ad9467_probe(struct spi_device *spi)
 
        id = ad9467_spi_read(spi, AN877_ADC_REG_CHIP_ID);
        if (id != conv->chip_info->id) {
-               dev_err(&spi->dev, "Unrecognized CHIP_ID 0x%X\n", id);
+               dev_err(&spi->dev, "Mismatch CHIP_ID, got 0x%X, expected 0x%X\n",
+                       id, conv->chip_info->id);
                return -ENODEV;
        }