Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: accel: 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-2-mail@mariushoch.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Marius Hoch and committed by
Jonathan Cameron
9445368b ef513aa7

+2
+1
drivers/iio/accel/st_accel_core.c
··· 1007 1007 .wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS, 1008 1008 .sensors_supported = { 1009 1009 [0] = LSM9DS0_IMU_DEV_NAME, 1010 + [1] = LSM303D_IMU_DEV_NAME, 1010 1011 }, 1011 1012 .ch = (struct iio_chan_spec *)st_accel_16bit_channels, 1012 1013 .odr = {
+1
include/linux/iio/common/st_sensors.h
··· 22 22 #include <linux/platform_data/st_sensors_pdata.h> 23 23 24 24 #define LSM9DS0_IMU_DEV_NAME "lsm9ds0" 25 + #define LSM303D_IMU_DEV_NAME "lsm303d" 25 26 26 27 /* 27 28 * Buffer size max case: 2bytes per channel, 3 channels in total +