Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198319
b: refs/heads/master
c: 342c5f1
h: refs/heads/master
i:
  198317: 7eec128
  198315: 7763748
  198311: 5a50895
  198303: 72850b2
v: v3
  • Loading branch information
Samu Onkalo authored and Linus Torvalds committed May 25, 2010
1 parent 8eee279 commit 7d403f2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 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: ecc437aeee65afeea2e1bed963ccf6c384c555ea
refs/heads/master: 342c5f128140d54961c435d1702eadcaba97a37a
15 changes: 13 additions & 2 deletions trunk/drivers/hwmon/lis3lv02d.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ EXPORT_SYMBOL_GPL(lis3lv02d_remove_fs);
static void lis3lv02d_8b_configure(struct lis3lv02d *dev,
struct lis3lv02d_platform_data *p)
{
int ctrl2 = p->hipass_ctrl;

if (p->click_flags) {
dev->write(dev, CLICK_CFG, p->click_flags);
dev->write(dev, CLICK_TIMELIMIT, p->click_time_limit);
Expand All @@ -540,9 +542,18 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *dev,
dev->write(dev, FF_WU_THS_1, p->wakeup_thresh & 0x7f);
/* default to 2.5ms for now */
dev->write(dev, FF_WU_DURATION_1, 1);
/* enable high pass filter for both free-fall units */
dev->write(dev, CTRL_REG2, HP_FF_WU1 | HP_FF_WU2);
ctrl2 ^= HP_FF_WU1; /* Xor to keep compatible with old pdata*/
}

if (p->wakeup_flags2) {
dev->write(dev, FF_WU_CFG_2, p->wakeup_flags2);
dev->write(dev, FF_WU_THS_2, p->wakeup_thresh2 & 0x7f);
/* default to 2.5ms for now */
dev->write(dev, FF_WU_DURATION_2, 1);
ctrl2 ^= HP_FF_WU2; /* Xor to keep compatible with old pdata*/
}
/* Configure hipass filters */
dev->write(dev, CTRL_REG2, ctrl2);
}

/*
Expand Down
9 changes: 9 additions & 0 deletions trunk/include/linux/lis3lv02d.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ struct lis3lv02d_platform_data {
#define LIS3_WAKEUP_Z_HI (1 << 5)
unsigned char wakeup_flags;
unsigned char wakeup_thresh;
unsigned char wakeup_flags2;
unsigned char wakeup_thresh2;
#define LIS3_HIPASS_CUTFF_8HZ 0
#define LIS3_HIPASS_CUTFF_4HZ 1
#define LIS3_HIPASS_CUTFF_2HZ 2
#define LIS3_HIPASS_CUTFF_1HZ 3
#define LIS3_HIPASS1_DISABLE (1 << 2)
#define LIS3_HIPASS2_DISABLE (1 << 3)
unsigned char hipass_ctrl;
#define LIS3_NO_MAP 0
#define LIS3_DEV_X 1
#define LIS3_DEV_Y 2
Expand Down

0 comments on commit 7d403f2

Please sign in to comment.