* [PATCH] iio: adc: ad9467: refine mismatch vs unknown chip-id messages
@ 2020-09-16 8:31 Alexandru Ardelean
2020-09-16 18:14 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Ardelean @ 2020-09-16 8:31 UTC (permalink / raw)
To: linux-iio, linux-kernel; +Cc: jic23, Alexandru Ardelean
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>
---
drivers/iio/adc/ad9467.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c
index 8a6682b567be..f068256cfca9 100644
--- a/drivers/iio/adc/ad9467.c
+++ b/drivers/iio/adc/ad9467.c
@@ -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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: adc: ad9467: refine mismatch vs unknown chip-id messages
2020-09-16 8:31 [PATCH] iio: adc: ad9467: refine mismatch vs unknown chip-id messages Alexandru Ardelean
@ 2020-09-16 18:14 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2020-09-16 18:14 UTC (permalink / raw)
To: Alexandru Ardelean; +Cc: linux-iio, linux-kernel
On Wed, 16 Sep 2020 11:31:28 +0300
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:
> 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>
applied.
thanks,
Jonathan
> ---
> drivers/iio/adc/ad9467.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c
> index 8a6682b567be..f068256cfca9 100644
> --- a/drivers/iio/adc/ad9467.c
> +++ b/drivers/iio/adc/ad9467.c
> @@ -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;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-16 18:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 8:31 [PATCH] iio: adc: ad9467: refine mismatch vs unknown chip-id messages Alexandru Ardelean
2020-09-16 18:14 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).