diff options
author | Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | 2017-09-17 18:17:09 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-10-10 20:38:39 +0100 |
commit | a542f9a04d30570d367770e34f2c5d0c1d313337 (patch) | |
tree | 06e67ae614f99ddcbb3f1c67de446bd37ab85142 /drivers/iio/pressure | |
parent | 6f667004612a11460551f464bf979005f520a6ee (diff) |
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/pressure')
-rw-r--r-- | drivers/iio/pressure/st_pressure_core.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c index 15ad6054d9f6..349e5c713c03 100644 --- a/drivers/iio/pressure/st_pressure_core.c +++ b/drivers/iio/pressure/st_pressure_core.c @@ -283,15 +283,17 @@ static const struct st_sensor_settings st_press_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 = 0x03, @@ -404,11 +406,11 @@ static const struct st_sensor_settings st_press_sensors_settings[] = { .int1 = { .addr = 0x23, .mask = 0x01, + .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 = 0x03, @@ -473,11 +475,11 @@ static const struct st_sensor_settings st_press_sensors_settings[] = { .int1 = { .addr = 0x12, .mask = 0x04, + .addr_od = 0x12, + .mask_od = 0x40, }, .addr_ihl = 0x12, .mask_ihl = 0x80, - .addr_od = 0x12, - .mask_od = 0x40, .stat_drdy = { .addr = ST_SENSORS_DEFAULT_STAT_ADDR, .mask = 0x03, |