summaryrefslogtreecommitdiffstats
path: root/drivers/iio/pressure
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-09-16 17:02:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-09-21 19:24:03 +0100
commit38d1c6a9116bd9642ebcb027ac66305590aa8488 (patch)
tree068330a74e5e4f649a7eced16256ffe6ff2c50ee /drivers/iio/pressure
parent9d6c39867cc6cdfb6198ec83165b72e0f14ef8b6 (diff)
downloadop-kernel-dev-38d1c6a9116bd9642ebcb027ac66305590aa8488.zip
op-kernel-dev-38d1c6a9116bd9642ebcb027ac66305590aa8488.tar.gz
iio: sensors-core: st: Support sensors which don't have a Data Ready pin
Not all ST's sensors support data ready, so let's make the declaration of one conditional. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/pressure')
-rw-r--r--drivers/iio/pressure/st_pressure_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
index 93bff9b..3abada2 100644
--- a/drivers/iio/pressure/st_pressure_core.c
+++ b/drivers/iio/pressure/st_pressure_core.c
@@ -254,7 +254,8 @@ int st_press_common_probe(struct iio_dev *indio_dev,
pdata->odr = pdata->sensor->odr.odr_avl[0].hz;
- if (!plat_data)
+ /* Some devices don't support a data ready pin. */
+ if (!plat_data && pdata->sensor->drdy_irq.addr)
plat_data =
(struct st_sensors_platform_data *)&default_press_pdata;
OpenPOWER on IntegriCloud