Re: [PATCH 04/10] iio: st_sensors: make detection more helpful

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/04/15 14:15, Linus Walleij wrote:
> 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@xxxxxxxxxx>
Applied.
> ---
>  drivers/iio/common/st_sensors/st_sensors_core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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;
>  	}
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux