summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel/st_accel_spi.c
diff options
context:
space:
mode:
authorSicelo A. Mhlongo <absicsz@gmail.com>2022-03-07 14:25:02 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-04-04 10:11:23 +0200
commit8a7449d68670a8f9033d57b9e7997af77a900d53 (patch)
treea463b16dd47b0d29742a29f4ee16027155bb3a06 /drivers/iio/accel/st_accel_spi.c
parentiio: accel: Remove unused enum in st_accel (diff)
downloadlinux-8a7449d68670a8f9033d57b9e7997af77a900d53.tar.xz
linux-8a7449d68670a8f9033d57b9e7997af77a900d53.zip
iio: accel: add support for LIS302DL variant
Add support for STMicroelectronics LIS302DL accelerometer to the st_accel framework. Datasheet: https://www.st.com/resource/en/datasheet/lis302dl.pdf Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220307132502.73854-4-absicsz@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to '')
-rw-r--r--drivers/iio/accel/st_accel_spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iio/accel/st_accel_spi.c b/drivers/iio/accel/st_accel_spi.c
index 108b63d0146c..6c0917750288 100644
--- a/drivers/iio/accel/st_accel_spi.c
+++ b/drivers/iio/accel/st_accel_spi.c
@@ -92,6 +92,10 @@ static const struct of_device_id st_accel_of_match[] = {
.compatible = "st,lis3de",
.data = LIS3DE_ACCEL_DEV_NAME,
},
+ {
+ .compatible = "st,lis302dl",
+ .data = LIS302DL_ACCEL_DEV_NAME,
+ },
{}
};
MODULE_DEVICE_TABLE(of, st_accel_of_match);
@@ -147,6 +151,7 @@ static const struct spi_device_id st_accel_id_table[] = {
{ LIS2DW12_ACCEL_DEV_NAME },
{ LIS3DHH_ACCEL_DEV_NAME },
{ LIS3DE_ACCEL_DEV_NAME },
+ { LIS302DL_ACCEL_DEV_NAME },
{},
};
MODULE_DEVICE_TABLE(spi, st_accel_id_table);