diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2019-10-06 15:22:07 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-10-15 22:11:06 +0200 |
commit | 3ea39d61eea6af614fe166814c9e5cb8cff0e8c3 (patch) | |
tree | 9b48e138726a3d7e5bc98062c5d4ed8dbb2ff7e4 /drivers/iio/imu | |
parent | dt-bindings: iio: imu: st_lsm6dsx: document missing wakeup-source property (diff) | |
download | linux-3ea39d61eea6af614fe166814c9e5cb8cff0e8c3.tar.xz linux-3ea39d61eea6af614fe166814c9e5cb8cff0e8c3.zip |
iio: imu: st_lsm6dsx: enable wake-up event for LSM6DSO
Add missing wake-up register info for LSM6DSO/LSM6DSOX sensor
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/imu')
-rw-r--r-- | drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index 5be372d5f407..8f70a645f65c 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -790,6 +790,14 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = { .addr = 0x56, .mask = BIT(6), }, + .irq1_func = { + .addr = 0x5e, + .mask = BIT(5), + }, + .irq2_func = { + .addr = 0x5f, + .mask = BIT(5), + }, .hla = { .addr = 0x12, .mask = BIT(5), @@ -857,7 +865,22 @@ static const struct st_lsm6dsx_settings st_lsm6dsx_sensor_settings[] = { .slv0_addr = 0x15, .dw_slv0_addr = 0x21, .batch_en = BIT(3), - } + }, + .event_settings = { + .enable_reg = { + .addr = 0x58, + .mask = BIT(7), + }, + .wakeup_reg = { + .addr = 0x5b, + .mask = GENMASK(5, 0), + }, + .wakeup_src_reg = 0x1b, + .wakeup_src_status_mask = BIT(3), + .wakeup_src_z_mask = BIT(0), + .wakeup_src_y_mask = BIT(1), + .wakeup_src_x_mask = BIT(2), + }, }, { .wai = 0x6b, |