diff options
author | Sebastian Reichel <sre@kernel.org> | 2015-03-27 10:39:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-03 10:20:54 -0400 |
commit | c5131a373613713fccd3b7a377d957391c498f21 (patch) | |
tree | b8891b914e52e754bd8f663f09b48174587c8260 /drivers/misc/lis3lv02d | |
parent | cdcd6f824ecb6b5e5fd6729c2552c1254012c3ca (diff) |
lis3lv02d: DT: add wakeup unit 2 and wakeup threshold
This adds support for the the wakeup threshold and
support for the second wakeup unit to the DT based
setup.
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/lis3lv02d')
-rw-r--r-- | drivers/misc/lis3lv02d/lis3lv02d.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index d2b0968b1ded..4739689d23ad 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c | |||
@@ -1032,6 +1032,23 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3) | |||
1032 | pdata->wakeup_flags |= LIS3_WAKEUP_Z_LO; | 1032 | pdata->wakeup_flags |= LIS3_WAKEUP_Z_LO; |
1033 | if (of_get_property(np, "st,wakeup-z-hi", NULL)) | 1033 | if (of_get_property(np, "st,wakeup-z-hi", NULL)) |
1034 | pdata->wakeup_flags |= LIS3_WAKEUP_Z_HI; | 1034 | pdata->wakeup_flags |= LIS3_WAKEUP_Z_HI; |
1035 | if (of_get_property(np, "st,wakeup-threshold", &val)) | ||
1036 | pdata->wakeup_thresh = val; | ||
1037 | |||
1038 | if (of_get_property(np, "st,wakeup2-x-lo", NULL)) | ||
1039 | pdata->wakeup_flags2 |= LIS3_WAKEUP_X_LO; | ||
1040 | if (of_get_property(np, "st,wakeup2-x-hi", NULL)) | ||
1041 | pdata->wakeup_flags2 |= LIS3_WAKEUP_X_HI; | ||
1042 | if (of_get_property(np, "st,wakeup2-y-lo", NULL)) | ||
1043 | pdata->wakeup_flags2 |= LIS3_WAKEUP_Y_LO; | ||
1044 | if (of_get_property(np, "st,wakeup2-y-hi", NULL)) | ||
1045 | pdata->wakeup_flags2 |= LIS3_WAKEUP_Y_HI; | ||
1046 | if (of_get_property(np, "st,wakeup2-z-lo", NULL)) | ||
1047 | pdata->wakeup_flags2 |= LIS3_WAKEUP_Z_LO; | ||
1048 | if (of_get_property(np, "st,wakeup2-z-hi", NULL)) | ||
1049 | pdata->wakeup_flags2 |= LIS3_WAKEUP_Z_HI; | ||
1050 | if (of_get_property(np, "st,wakeup2-threshold", &val)) | ||
1051 | pdata->wakeup_thresh2 = val; | ||
1035 | 1052 | ||
1036 | if (!of_property_read_u32(np, "st,highpass-cutoff-hz", &val)) { | 1053 | if (!of_property_read_u32(np, "st,highpass-cutoff-hz", &val)) { |
1037 | switch (val) { | 1054 | switch (val) { |