diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/lis3lv02d.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c index 99fd45deda41..50f312339608 100644 --- a/drivers/hwmon/lis3lv02d.c +++ b/drivers/hwmon/lis3lv02d.c | |||
@@ -524,6 +524,8 @@ EXPORT_SYMBOL_GPL(lis3lv02d_remove_fs); | |||
524 | static void lis3lv02d_8b_configure(struct lis3lv02d *dev, | 524 | static void lis3lv02d_8b_configure(struct lis3lv02d *dev, |
525 | struct lis3lv02d_platform_data *p) | 525 | struct lis3lv02d_platform_data *p) |
526 | { | 526 | { |
527 | int ctrl2 = p->hipass_ctrl; | ||
528 | |||
527 | if (p->click_flags) { | 529 | if (p->click_flags) { |
528 | dev->write(dev, CLICK_CFG, p->click_flags); | 530 | dev->write(dev, CLICK_CFG, p->click_flags); |
529 | dev->write(dev, CLICK_TIMELIMIT, p->click_time_limit); | 531 | dev->write(dev, CLICK_TIMELIMIT, p->click_time_limit); |
@@ -540,9 +542,18 @@ static void lis3lv02d_8b_configure(struct lis3lv02d *dev, | |||
540 | dev->write(dev, FF_WU_THS_1, p->wakeup_thresh & 0x7f); | 542 | dev->write(dev, FF_WU_THS_1, p->wakeup_thresh & 0x7f); |
541 | /* default to 2.5ms for now */ | 543 | /* default to 2.5ms for now */ |
542 | dev->write(dev, FF_WU_DURATION_1, 1); | 544 | dev->write(dev, FF_WU_DURATION_1, 1); |
543 | /* enable high pass filter for both free-fall units */ | 545 | ctrl2 ^= HP_FF_WU1; /* Xor to keep compatible with old pdata*/ |
544 | dev->write(dev, CTRL_REG2, HP_FF_WU1 | HP_FF_WU2); | 546 | } |
547 | |||
548 | if (p->wakeup_flags2) { | ||
549 | dev->write(dev, FF_WU_CFG_2, p->wakeup_flags2); | ||
550 | dev->write(dev, FF_WU_THS_2, p->wakeup_thresh2 & 0x7f); | ||
551 | /* default to 2.5ms for now */ | ||
552 | dev->write(dev, FF_WU_DURATION_2, 1); | ||
553 | ctrl2 ^= HP_FF_WU2; /* Xor to keep compatible with old pdata*/ | ||
545 | } | 554 | } |
555 | /* Configure hipass filters */ | ||
556 | dev->write(dev, CTRL_REG2, ctrl2); | ||
546 | } | 557 | } |
547 | 558 | ||
548 | /* | 559 | /* |