pmaports/device/community/linux-nokia-n900/0005-iio-accel-st-accel-add-lis302dl.patch
Sicelo A. Mhlongo c49180f8cf
linux-nokia-n900: apply wifi cve fixes (MR 3558)
- Downgrade kernel from EOL 5.18 to LTS 5.15 in order to apply WiFi CVE fixes.
  It is currently not possible to upgrade to newer (5.19+) kernels due to a USB
  regression.
- Modify 0005-iio-accel-st-accel-add-lis302dl.patch so it applies on 5.15.74
- Reinstate 0008-wl1251-specify-max.-IE-length.patch for nl80211 support. Patch
  was dropped because it is in mainline since 5.18

[ci:skip-vercheck]: downgrade
[ci:skip-build]: already built successfully in CI
2022-10-19 08:34:43 +02:00

39 lines
1.4 KiB
Diff

diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
index 8750dea56fcb..586146ac6884 100644
--- a/drivers/iio/accel/st_accel.h
+++ b/drivers/iio/accel/st_accel.h
@@ -61,6 +61,7 @@ enum st_accel_type {
#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
index f1e6ec380667..2adf8cf7307b 100644
--- 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
index cba57459e90a..466443101e8a 100644
--- a/drivers/iio/accel/st_accel_i2c.c
+++ b/drivers/iio/accel/st_accel_i2c.c
@@ -107,6 +107,10 @@ static const struct of_device_id st_accel_of_match[] = {
.compatible = "st,lis2hh12",
.data = LIS2HH12_ACCEL_DEV_NAME,
},
+ {
+ .compatible = "st,lis302dl",
+ .data = LIS302DL_ACCEL_DEV_NAME,
+ },
{},
};
MODULE_DEVICE_TABLE(of, st_accel_of_match);