Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264229
b: refs/heads/master
c: 05faadc
h: refs/heads/master
i:
  264227: adac67d
v: v3
  • Loading branch information
Takashi Iwai authored and Linus Torvalds committed Oct 4, 2011
1 parent 1f2d6af commit cc0ca1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f86267b79bc6e357b8606077c7f70239045ea9c
refs/heads/master: 05faadcf59507e8eea57ffbeea9cbb14c9a2ab3d
14 changes: 8 additions & 6 deletions trunk/drivers/misc/lis3lv02d/lis3lv02d.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,14 @@ void lis3lv02d_poweron(struct lis3lv02d *lis3)
* both have been read. So the value read will always be correct.
* Set BOOT bit to refresh factory tuning values.
*/
lis3->read(lis3, CTRL_REG2, &reg);
if (lis3->whoami == WAI_12B)
reg |= CTRL2_BDU | CTRL2_BOOT;
else
reg |= CTRL2_BOOT_8B;
lis3->write(lis3, CTRL_REG2, reg);
if (lis3->pdata) {
lis3->read(lis3, CTRL_REG2, &reg);
if (lis3->whoami == WAI_12B)
reg |= CTRL2_BDU | CTRL2_BOOT;
else
reg |= CTRL2_BOOT_8B;
lis3->write(lis3, CTRL_REG2, reg);
}

/* LIS3 power on delay is quite long */
msleep(lis3->pwron_delay / lis3lv02d_get_odr());
Expand Down

0 comments on commit cc0ca1a

Please sign in to comment.