summaryrefslogtreecommitdiff
path: root/drivers/iio/magnetometer/st_magn_spi.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>2017-08-16 20:02:52 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2017-08-17 17:51:39 +0300
commitd0b7fea58ab91d6363430cbc00b1d1e1b1996552 (patch)
tree4095ada5faec097ea265c8b71e41a965b5d2d99a /drivers/iio/magnetometer/st_magn_spi.c
parent3f09b8d2ea9940041557fffd55244da5bc434a99 (diff)
downloadlinux-d0b7fea58ab91d6363430cbc00b1d1e1b1996552.tar.xz
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_spi.c')
-rw-r--r--drivers/iio/magnetometer/st_magn_spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iio/magnetometer/st_magn_spi.c b/drivers/iio/magnetometer/st_magn_spi.c
index 1ea64dd318aa..7b7cd08fcc32 100644
--- a/drivers/iio/magnetometer/st_magn_spi.c
+++ b/drivers/iio/magnetometer/st_magn_spi.c
@@ -33,6 +33,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);
@@ -74,6 +78,7 @@ static int st_magn_spi_remove(struct spi_device *spi)
static const struct spi_device_id st_magn_id_table[] = {
{ LIS3MDL_MAGN_DEV_NAME },
{ LSM303AGR_MAGN_DEV_NAME },
+ { LIS2MDL_MAGN_DEV_NAME },
{},
};
MODULE_DEVICE_TABLE(spi, st_magn_id_table);