]> git.karo-electronics.de Git - linux-beck.git/commitdiff
IIO: GYRO: ADXRS450: Don't exit probe, in case the power on default is not met.
authorMichael Hennerich <michael.hennerich@analog.com>
Fri, 29 Apr 2011 12:17:04 +0000 (14:17 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 3 May 2011 18:40:03 +0000 (11:40 -0700)
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@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/gyro/adxrs450_core.c

index e71b91cafd3d9f47fa9bf1d2bc6e84a0a99472af..7a9d7c258dcfaea12d22f3b872d47d9c5ed550ab 100644 (file)
@@ -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);