From 0d92aa2c272faea47cd5e9acb482acdb9eed2c1d Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Thu, 25 Oct 2018 19:38:10 -0700 Subject: 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 Signed-off-by: Jonathan Cameron --- drivers/iio/magnetometer/st_magn_spi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/iio/magnetometer/st_magn_spi.c') diff --git a/drivers/iio/magnetometer/st_magn_spi.c b/drivers/iio/magnetometer/st_magn_spi.c index 15bb09267098..cb05fcd9ddfe 100644 --- a/drivers/iio/magnetometer/st_magn_spi.c +++ b/drivers/iio/magnetometer/st_magn_spi.c @@ -39,6 +39,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); @@ -81,6 +85,7 @@ static const struct spi_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(spi, st_magn_id_table); -- cgit v1.2.3