diff options
author | Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | 2017-09-17 19:17:09 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-10-10 22:38:39 +0300 |
commit | a542f9a04d30570d367770e34f2c5d0c1d313337 (patch) | |
tree | 06e67ae614f99ddcbb3f1c67de446bd37ab85142 /drivers/iio/accel | |
parent | 6f667004612a11460551f464bf979005f520a6ee (diff) | |
download | linux-a542f9a04d30570d367770e34f2c5d0c1d313337.tar.xz |
iio: st_sensors: split open-drain parameters for irq1 and irq2
Define st_sensor_int_drdy structure in st_sensor_data_ready_irq in order
to contain irq line parameters of the device.
Moreover separate data-ready open-drain configuration parameters for INT1
and INT2 pins in st_sensor_data_ready_irq data structure.
That change will be used to properly support LIS3DHH accel sensor.
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r-- | drivers/iio/accel/st_accel_core.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c index 731ec3a4c82b..c88db25a1aff 100644 --- a/drivers/iio/accel/st_accel_core.c +++ b/drivers/iio/accel/st_accel_core.c @@ -236,15 +236,17 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = { .int1 = { .addr = 0x22, .mask = 0x02, + .addr_od = 0x22, + .mask_od = 0x40, }, .int2 = { .addr = 0x22, .mask = 0x10, + .addr_od = 0x22, + .mask_od = 0x40, }, .addr_ihl = 0x22, .mask_ihl = 0x80, - .addr_od = 0x22, - .mask_od = 0x40, .stat_drdy = { .addr = ST_SENSORS_DEFAULT_STAT_ADDR, .mask = 0x07, @@ -468,15 +470,17 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = { .int1 = { .addr = 0x22, .mask = 0x04, + .addr_od = 0x22, + .mask_od = 0x40, }, .int2 = { .addr = 0x22, .mask = 0x20, + .addr_od = 0x22, + .mask_od = 0x40, }, .addr_ihl = 0x22, .mask_ihl = 0x80, - .addr_od = 0x22, - .mask_od = 0x40, .stat_drdy = { .addr = ST_SENSORS_DEFAULT_STAT_ADDR, .mask = 0x07, @@ -750,15 +754,17 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = { .int1 = { .addr = 0x23, .mask = 0x01, + .addr_od = 0x22, + .mask_od = 0x20, }, .int2 = { .addr = 0x24, .mask = 0x01, + .addr_od = 0x22, + .mask_od = 0x20, }, .addr_ihl = 0x22, .mask_ihl = 0x08, - .addr_od = 0x22, - .mask_od = 0x20, .stat_drdy = { .addr = ST_SENSORS_DEFAULT_STAT_ADDR, .mask = 0x01, |