diff options
author | Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | 2017-08-16 19:02:52 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-08-17 15:51:39 +0100 |
commit | d0b7fea58ab91d6363430cbc00b1d1e1b1996552 (patch) | |
tree | 4095ada5faec097ea265c8b71e41a965b5d2d99a /drivers/iio/magnetometer/st_magn_i2c.c | |
parent | 3f09b8d2ea9940041557fffd55244da5bc434a99 (diff) | |
download | talos-obmc-linux-d0b7fea58ab91d6363430cbc00b1d1e1b1996552.tar.gz talos-obmc-linux-d0b7fea58ab91d6363430cbc00b1d1e1b1996552.zip |
iio: magnetometer: add support to LIS2MDL
add support to STMicroelectronics LIS2MDL magnetometer in
st_magn framework
http://www.st.com/resource/en/datasheet/lis2mdl.pdf
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/magnetometer/st_magn_i2c.c')
-rw-r--r-- | drivers/iio/magnetometer/st_magn_i2c.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iio/magnetometer/st_magn_i2c.c b/drivers/iio/magnetometer/st_magn_i2c.c index 6a6c8121ac2c..feaa28cf6a77 100644 --- a/drivers/iio/magnetometer/st_magn_i2c.c +++ b/drivers/iio/magnetometer/st_magn_i2c.c @@ -40,6 +40,10 @@ static const struct of_device_id st_magn_of_match[] = { .compatible = "st,lsm303agr-magn", .data = LSM303AGR_MAGN_DEV_NAME, }, + { + .compatible = "st,lis2mdl", + .data = LIS2MDL_MAGN_DEV_NAME, + }, {}, }; MODULE_DEVICE_TABLE(of, st_magn_of_match); @@ -85,6 +89,7 @@ static const struct i2c_device_id st_magn_id_table[] = { { LSM303DLM_MAGN_DEV_NAME }, { LIS3MDL_MAGN_DEV_NAME }, { LSM303AGR_MAGN_DEV_NAME }, + { LIS2MDL_MAGN_DEV_NAME }, {}, }; MODULE_DEVICE_TABLE(i2c, st_magn_id_table); |