summaryrefslogtreecommitdiff
path: root/drivers/iio/magnetometer/st_magn_i2c.c
diff options
context:
space:
mode:
authorMartin Kelly <martin@martingkelly.com>2018-10-25 19:38:10 -0700
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-11-11 15:29:43 +0000
commit0d92aa2c272faea47cd5e9acb482acdb9eed2c1d (patch)
treedf91e73da99732389273d972fde17d12ce74c0e9 /drivers/iio/magnetometer/st_magn_i2c.c
parent53759e259da43fae0e5322d227ffce60857f2828 (diff)
iio:magnetometer: st_magn: add LSM9DS1 support
Update the sensor settings to support the LSM9DS1 sensor. Although the LSM9DS1 accelerometer and gyroscope are coupled together to use the same FIFO, the magnetometer is separate and can be cleanly supported without refactoring the existing driver. Signed-off-by: Martin Kelly <martin@martingkelly.com> 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.c5
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 feaa28cf6a77..68650f5f5c19 100644
--- a/drivers/iio/magnetometer/st_magn_i2c.c
+++ b/drivers/iio/magnetometer/st_magn_i2c.c
@@ -44,6 +44,10 @@ static const struct of_device_id st_magn_of_match[] = {
.compatible = "st,lis2mdl",
.data = LIS2MDL_MAGN_DEV_NAME,
},
+ {
+ .compatible = "st,lsm9ds1-magn",
+ .data = LSM9DS1_MAGN_DEV_NAME,
+ },
{},
};
MODULE_DEVICE_TABLE(of, st_magn_of_match);
@@ -90,6 +94,7 @@ static const struct i2c_device_id st_magn_id_table[] = {
{ LIS3MDL_MAGN_DEV_NAME },
{ LSM303AGR_MAGN_DEV_NAME },
{ LIS2MDL_MAGN_DEV_NAME },
+ { LSM9DS1_MAGN_DEV_NAME },
{},
};
MODULE_DEVICE_TABLE(i2c, st_magn_id_table);