diff options
author | Denis CIOCCA <denis.ciocca@st.com> | 2013-06-19 09:28:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-08-03 18:40:28 +0100 |
commit | 23cde4d65cc7d11e2048d2b240cdf13927ac50d0 (patch) | |
tree | 3fd2d23f8c092056244e14703bce9842c203ba13 /drivers/iio/magnetometer | |
parent | 36e607a16b8def1b184d48a4489b716d6dbe3379 (diff) | |
download | op-kernel-dev-23cde4d65cc7d11e2048d2b240cdf13927ac50d0.zip op-kernel-dev-23cde4d65cc7d11e2048d2b240cdf13927ac50d0.tar.gz |
iio: Added ST-sensors platform data to select the DRDY interrupt pin
This patch add support to redirect the DRDY interrupt on INT1 or INT2
on accelerometer and pressure sensors.
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r-- | drivers/iio/magnetometer/st_magn.h | 3 | ||||
-rw-r--r-- | drivers/iio/magnetometer/st_magn_core.c | 5 | ||||
-rw-r--r-- | drivers/iio/magnetometer/st_magn_i2c.c | 2 | ||||
-rw-r--r-- | drivers/iio/magnetometer/st_magn_spi.c | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/drivers/iio/magnetometer/st_magn.h b/drivers/iio/magnetometer/st_magn.h index 7e81d00..694e33e 100644 --- a/drivers/iio/magnetometer/st_magn.h +++ b/drivers/iio/magnetometer/st_magn.h @@ -18,7 +18,8 @@ #define LSM303DLM_MAGN_DEV_NAME "lsm303dlm_magn" #define LIS3MDL_MAGN_DEV_NAME "lis3mdl" -int st_magn_common_probe(struct iio_dev *indio_dev); +int st_magn_common_probe(struct iio_dev *indio_dev, + struct st_sensors_platform_data *pdata); void st_magn_common_remove(struct iio_dev *indio_dev); #ifdef CONFIG_IIO_BUFFER diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c index ebfe8f1..7cd784f 100644 --- a/drivers/iio/magnetometer/st_magn_core.c +++ b/drivers/iio/magnetometer/st_magn_core.c @@ -345,7 +345,8 @@ static const struct iio_info magn_info = { .write_raw = &st_magn_write_raw, }; -int st_magn_common_probe(struct iio_dev *indio_dev) +int st_magn_common_probe(struct iio_dev *indio_dev, + struct st_sensors_platform_data *pdata) { int err; struct st_sensor_data *mdata = iio_priv(indio_dev); @@ -367,7 +368,7 @@ int st_magn_common_probe(struct iio_dev *indio_dev) &mdata->sensor->fs.fs_avl[0]; mdata->odr = mdata->sensor->odr.odr_avl[0].hz; - err = st_sensors_init_sensor(indio_dev); + err = st_sensors_init_sensor(indio_dev, pdata); if (err < 0) goto st_magn_common_probe_error; diff --git a/drivers/iio/magnetometer/st_magn_i2c.c b/drivers/iio/magnetometer/st_magn_i2c.c index e6adc4a..1bed117 100644 --- a/drivers/iio/magnetometer/st_magn_i2c.c +++ b/drivers/iio/magnetometer/st_magn_i2c.c @@ -36,7 +36,7 @@ static int st_magn_i2c_probe(struct i2c_client *client, st_sensors_i2c_configure(indio_dev, client, mdata); - err = st_magn_common_probe(indio_dev); + err = st_magn_common_probe(indio_dev, NULL); if (err < 0) goto st_magn_common_probe_error; diff --git a/drivers/iio/magnetometer/st_magn_spi.c b/drivers/iio/magnetometer/st_magn_spi.c index 51adb79..a2333a1 100644 --- a/drivers/iio/magnetometer/st_magn_spi.c +++ b/drivers/iio/magnetometer/st_magn_spi.c @@ -35,7 +35,7 @@ static int st_magn_spi_probe(struct spi_device *spi) st_sensors_spi_configure(indio_dev, spi, mdata); - err = st_magn_common_probe(indio_dev); + err = st_magn_common_probe(indio_dev, NULL); if (err < 0) goto st_magn_common_probe_error; |