2022-02-26 12:16:31 +00:00
|
|
|
diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
|
2022-10-18 18:30:35 +00:00
|
|
|
index 8750dea56fcb..586146ac6884 100644
|
2022-02-26 12:16:31 +00:00
|
|
|
--- a/drivers/iio/accel/st_accel.h
|
|
|
|
+++ b/drivers/iio/accel/st_accel.h
|
2022-10-18 18:30:35 +00:00
|
|
|
@@ -61,6 +61,7 @@ enum st_accel_type {
|
2022-02-26 12:16:31 +00:00
|
|
|
#define LIS3DE_ACCEL_DEV_NAME "lis3de"
|
|
|
|
#define LIS2DE12_ACCEL_DEV_NAME "lis2de12"
|
|
|
|
#define LIS2HH12_ACCEL_DEV_NAME "lis2hh12"
|
|
|
|
+#define LIS302DL_ACCEL_DEV_NAME "lis302dl"
|
|
|
|
|
|
|
|
#ifdef CONFIG_IIO_BUFFER
|
|
|
|
int st_accel_allocate_ring(struct iio_dev *indio_dev);
|
|
|
|
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
|
2022-10-18 18:30:35 +00:00
|
|
|
index f1e6ec380667..2adf8cf7307b 100644
|
2022-02-26 12:16:31 +00:00
|
|
|
--- a/drivers/iio/accel/st_accel_core.c
|
|
|
|
+++ b/drivers/iio/accel/st_accel_core.c
|
|
|
|
@@ -444,6 +444,7 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
|
|
|
|
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
|
|
|
|
.sensors_supported = {
|
|
|
|
[0] = LIS331DL_ACCEL_DEV_NAME,
|
|
|
|
+ [1] = LIS302DL_ACCEL_DEV_NAME,
|
|
|
|
},
|
|
|
|
.ch = (struct iio_chan_spec *)st_accel_8bit_channels,
|
|
|
|
.odr = {
|
|
|
|
diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
|
2022-10-18 18:30:35 +00:00
|
|
|
index cba57459e90a..466443101e8a 100644
|
2022-02-26 12:16:31 +00:00
|
|
|
--- a/drivers/iio/accel/st_accel_i2c.c
|
|
|
|
+++ b/drivers/iio/accel/st_accel_i2c.c
|
2022-10-18 18:30:35 +00:00
|
|
|
@@ -107,6 +107,10 @@ static const struct of_device_id st_accel_of_match[] = {
|
|
|
|
.compatible = "st,lis2hh12",
|
2022-02-26 12:16:31 +00:00
|
|
|
.data = LIS2HH12_ACCEL_DEV_NAME,
|
|
|
|
},
|
2022-05-30 18:01:44 +00:00
|
|
|
+ {
|
|
|
|
+ .compatible = "st,lis302dl",
|
|
|
|
+ .data = LIS302DL_ACCEL_DEV_NAME,
|
|
|
|
+ },
|
2022-02-26 12:16:31 +00:00
|
|
|
{},
|
|
|
|
};
|
2022-10-18 18:30:35 +00:00
|
|
|
MODULE_DEVICE_TABLE(of, st_accel_of_match);
|