diff options
author | Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | 2017-08-29 14:45:11 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-09-03 19:39:39 +0300 |
commit | c65e3d6ef4bfdc4c8460509f08507cf7dc026974 (patch) | |
tree | dc3f17d3e73e265983a2a31d8f138d90852de95d /drivers/iio/magnetometer | |
parent | 3af75db12e3d3537bc01c06bbdc876cb17e82b35 (diff) | |
download | linux-c65e3d6ef4bfdc4c8460509f08507cf7dc026974.tar.xz |
iio: magnetometer: st_magn: fix drdy line configuration for LIS3MDL
Data-ready line in LIS3MDL is routed to drdy pin and it is not possible
to select a different INT pin. st_sensors_set_dataready_irq() assumes
that if drdy int address is not exported in register map, irq trigger
is not supported by the sensor and hw_irq_trigger is always false.
Based on this configuration st_sensors_irq_thread does not consume
generated interrupt causing an unhandled irq.
Fix this taking into account status register address in
st_sensors_set_dataready_irq()
Fixes: 90efe0556292 (iio: st_sensors: harden interrupt handling)
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r-- | drivers/iio/magnetometer/st_magn_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c index 703e77008652..2e36d746f5bc 100644 --- a/drivers/iio/magnetometer/st_magn_core.c +++ b/drivers/iio/magnetometer/st_magn_core.c @@ -315,6 +315,10 @@ static const struct st_sensor_settings st_magn_sensors_settings[] = { }, }, }, + .drdy_irq = { + /* drdy line is routed drdy pin */ + .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, + }, .multi_read_bit = true, .bootime = 2, }, |