Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217109
b: refs/heads/master
c: 2a7fade
h: refs/heads/master
i:
  217107: 5165649
v: v3
  • Loading branch information
Samu Onkalo authored and Guenter Roeck committed Oct 25, 2010
1 parent c1ef425 commit 42811fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 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: 821f664644c2da9e1a51e36751abedf49d4332e0
refs/heads/master: 2a7fade7e03a7c773f91e2e5ff26ad6fafda5a9f
19 changes: 11 additions & 8 deletions trunk/drivers/hwmon/lis3lv02d.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,19 +307,22 @@ void lis3lv02d_poweron(struct lis3lv02d *lis3)

lis3->init(lis3);

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

/*
* Common configuration
* BDU: (12 bits sensors only) LSB and MSB values are not updated until
* both have been read. So the value read will always be correct.
* Set BOOT bit to refresh factory tuning values.
*/
if (lis3->whoami == WAI_12B) {
lis3->read(lis3, CTRL_REG2, &reg);
reg |= CTRL2_BDU;
lis3->write(lis3, CTRL_REG2, reg);
}
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());

if (lis3->reg_ctrl)
lis3_context_restore(lis3);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/hwmon/lis3lv02d.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ enum lis3lv02d_ctrl4_3dc {
enum lis302d_ctrl2 {
HP_FF_WU2 = 0x08,
HP_FF_WU1 = 0x04,
CTRL2_BOOT_8B = 0x40,
};

enum lis3lv02d_ctrl3 {
Expand Down

0 comments on commit 42811fa

Please sign in to comment.