diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2015-04-30 15:15:49 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-05-07 10:42:33 +0100 |
commit | 5e02bac3172fcad964eeef70ad21f583982a6eba (patch) | |
tree | dd26d9ace922a000c7525e9613ffa1a21c44a017 /drivers/iio/common | |
parent | bb60646c8befe218d0bd49e71e62252cd6408ae5 (diff) | |
download | linux-5e02bac3172fcad964eeef70ad21f583982a6eba.tar.gz linux-5e02bac3172fcad964eeef70ad21f583982a6eba.tar.bz2 linux-5e02bac3172fcad964eeef70ad21f583982a6eba.zip |
iio: st_sensors: make detection more helpful
The ST sensors are detected by reading a WhoAmI register and
matching the number found to a sensor name string. To make it
easier to figure out what happens when things go wrong, print
the WhoAmI value and the device name we're trying to match.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/common')
-rw-r--r-- | drivers/iio/common/st_sensors/st_sensors_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c index cbeb5e01bc3a..1255b157c71c 100644 --- a/drivers/iio/common/st_sensors/st_sensors_core.c +++ b/drivers/iio/common/st_sensors/st_sensors_core.c @@ -503,7 +503,8 @@ int st_sensors_check_device_support(struct iio_dev *indio_dev, break; } if (n == ARRAY_SIZE(sensor_settings[i].sensors_supported)) { - dev_err(&indio_dev->dev, "device name and WhoAmI mismatch.\n"); + dev_err(&indio_dev->dev, "device name \"%s\" and WhoAmI (0x%02x) mismatch", + indio_dev->name, wai); goto sensor_name_mismatch; } |