mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
IIO: GYRO: ADXRS450: Don't exit probe, in case the power on default is not met.
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>
This commit is contained in:
parent
7dd04eb04e
commit
1810b3bb7b
1 changed files with 3 additions and 5 deletions
|
@ -278,11 +278,9 @@ static int adxrs450_initial_setup(struct adxrs450_state *st)
|
||||||
ret = adxrs450_spi_initial(st, &t, 1);
|
ret = adxrs450_spi_initial(st, &t, 1);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
if (t != 0x01) {
|
if (t != 0x01)
|
||||||
dev_err(&st->us->dev, "The initial response is not correct!\n");
|
dev_warn(&st->us->dev, "The initial power on response "
|
||||||
return -ENODEV;
|
"is not correct! Restart without reset?\n");
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msleep(ADXRS450_STARTUP_DELAY);
|
msleep(ADXRS450_STARTUP_DELAY);
|
||||||
ret = adxrs450_spi_initial(st, &t, 0);
|
ret = adxrs450_spi_initial(st, &t, 0);
|
||||||
|
|
Loading…
Reference in a new issue