diff options
| -rw-r--r-- | drivers/misc/lis3lv02d/lis3lv02d.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index b928bc14e97b..8b51cd62d067 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c | |||
| @@ -375,12 +375,14 @@ void lis3lv02d_poweron(struct lis3lv02d *lis3) | |||
| 375 | * both have been read. So the value read will always be correct. | 375 | * both have been read. So the value read will always be correct. |
| 376 | * Set BOOT bit to refresh factory tuning values. | 376 | * Set BOOT bit to refresh factory tuning values. |
| 377 | */ | 377 | */ |
| 378 | lis3->read(lis3, CTRL_REG2, ®); | 378 | if (lis3->pdata) { |
| 379 | if (lis3->whoami == WAI_12B) | 379 | lis3->read(lis3, CTRL_REG2, ®); |
| 380 | reg |= CTRL2_BDU | CTRL2_BOOT; | 380 | if (lis3->whoami == WAI_12B) |
| 381 | else | 381 | reg |= CTRL2_BDU | CTRL2_BOOT; |
| 382 | reg |= CTRL2_BOOT_8B; | 382 | else |
| 383 | lis3->write(lis3, CTRL_REG2, reg); | 383 | reg |= CTRL2_BOOT_8B; |
| 384 | lis3->write(lis3, CTRL_REG2, reg); | ||
| 385 | } | ||
| 384 | 386 | ||
| 385 | /* LIS3 power on delay is quite long */ | 387 | /* LIS3 power on delay is quite long */ |
| 386 | msleep(lis3->pwron_delay / lis3lv02d_get_odr()); | 388 | msleep(lis3->pwron_delay / lis3lv02d_get_odr()); |
