summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorMarius Hoch <mail@mariushoch.de>2023-04-16 01:11:26 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-05-13 18:56:04 +0200
commita9e19f636036567284ef41008b930f5730acd974 (patch)
treecbdbceef57ffd8c5356c32cb44d940d55e1bcfa3 /drivers/iio
parentiio: accel: st_accel: Add LSM303D (diff)
downloadlinux-a9e19f636036567284ef41008b930f5730acd974.tar.xz
linux-a9e19f636036567284ef41008b930f5730acd974.zip
iio: magnetometer: st_accel: Add LSM303D
The lsm303d has the same register mapping as the lsm9ds0, thus we can just re-use that. Tested on a Lenovo Yoga Tablet 2 1051-F. Signed-off-by: Marius Hoch <mail@mariushoch.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20230415231130.115094-3-mail@mariushoch.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/magnetometer/st_magn_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
index 8faa7409d9e1..6cc0dfd31821 100644
--- a/drivers/iio/magnetometer/st_magn_core.c
+++ b/drivers/iio/magnetometer/st_magn_core.c
@@ -427,6 +427,7 @@ static const struct st_sensor_settings st_magn_sensors_settings[] = {
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
.sensors_supported = {
[0] = LSM9DS0_IMU_DEV_NAME,
+ [1] = LSM303D_IMU_DEV_NAME,
},
.ch = (struct iio_chan_spec *)st_magn_4_16bit_channels,
.odr = {