Re: [PATCH 6/6] IIO: GYRO: ADXRS450: Don't exit probe, in case the power on default is not met.

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

 



On 04/29/11 11:58, michael.hennerich@xxxxxxxxxx wrote:
> From: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
> 
> If the part get's probed twice without hard reset in between, the power on default
> register read-back can't be met. This shouldn't cause the second probe to fail.
> So warn but don't exit.
> 
> Signed-off-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
Acked-by: Jonathan Cameron <jic23@xxxxxxxxx>
> ---
>  drivers/staging/iio/gyro/adxrs450_core.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/iio/gyro/adxrs450_core.c b/drivers/staging/iio/gyro/adxrs450_core.c
> index e71b91c..7a9d7c2 100644
> --- a/drivers/staging/iio/gyro/adxrs450_core.c
> +++ b/drivers/staging/iio/gyro/adxrs450_core.c
> @@ -278,11 +278,9 @@ static int adxrs450_initial_setup(struct adxrs450_state *st)
>  	ret = adxrs450_spi_initial(st, &t, 1);
>  	if (ret)
>  		return ret;
> -	if (t != 0x01) {
> -		dev_err(&st->us->dev, "The initial response is not correct!\n");
> -		return -ENODEV;
> -
> -	}
> +	if (t != 0x01)
> +		dev_warn(&st->us->dev, "The initial power on response "
> +			 "is not correct! Restart without reset?\n");
>  
>  	msleep(ADXRS450_STARTUP_DELAY);
>  	ret = adxrs450_spi_initial(st, &t, 0);

--
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