diff options
Diffstat (limited to 'target/linux/generic/backport-4.19')
9 files changed, 21 insertions, 55 deletions
diff --git a/target/linux/generic/backport-4.19/499-v4.22-iio-add-IIO_MASSCONCENTRATION-channel-type.patch b/target/linux/generic/backport-4.19/499-v4.22-iio-add-IIO_MASSCONCENTRATION-channel-type.patch index c214495f03..bceb735146 100644 --- a/target/linux/generic/backport-4.19/499-v4.22-iio-add-IIO_MASSCONCENTRATION-channel-type.patch +++ b/target/linux/generic/backport-4.19/499-v4.22-iio-add-IIO_MASSCONCENTRATION-channel-type.patch @@ -28,8 +28,6 @@ Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> tools/iio/iio_event_monitor.c | 10 ++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) -diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio -index 8127a08e366d..67fd88bf7910 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio @@ -1684,4 +1684,19 @@ KernelVersion: 4.18 @@ -54,11 +52,9 @@ index 8127a08e366d..67fd88bf7910 100644 + Mass concentration reading of particulate matter in ug / m3. + pmX consists of particles with aerodynamic diameter less or + equal to X micrometers. -diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c -index 4f5cd9f60870..4700fd5d8c90 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c -@@ -87,6 +87,7 @@ static const char * const iio_chan_type_name_spec[] = { +@@ -87,6 +87,7 @@ static const char * const iio_chan_type_ [IIO_GRAVITY] = "gravity", [IIO_POSITIONRELATIVE] = "positionrelative", [IIO_PHASE] = "phase", @@ -66,7 +62,7 @@ index 4f5cd9f60870..4700fd5d8c90 100644 }; static const char * const iio_modifier_names[] = { -@@ -127,6 +128,10 @@ static const char * const iio_modifier_names[] = { +@@ -127,6 +128,10 @@ static const char * const iio_modifier_n [IIO_MOD_Q] = "q", [IIO_MOD_CO2] = "co2", [IIO_MOD_VOC] = "voc", @@ -77,8 +73,6 @@ index 4f5cd9f60870..4700fd5d8c90 100644 }; /* relies on pairs of these shared then separate */ -diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h -index 92baabc103ac..c59adac24b1c 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h @@ -46,6 +46,7 @@ enum iio_chan_type { @@ -100,11 +94,9 @@ index 92baabc103ac..c59adac24b1c 100644 }; enum iio_event_type { -diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c -index ac2de6b7e89f..f6b8003fbe3c 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c -@@ -60,6 +60,7 @@ static const char * const iio_chan_type_name_spec[] = { +@@ -60,6 +60,7 @@ static const char * const iio_chan_type_ [IIO_GRAVITY] = "gravity", [IIO_POSITIONRELATIVE] = "positionrelative", [IIO_PHASE] = "phase", @@ -112,7 +104,7 @@ index ac2de6b7e89f..f6b8003fbe3c 100644 }; static const char * const iio_ev_type_text[] = { -@@ -115,6 +116,10 @@ static const char * const iio_modifier_names[] = { +@@ -115,6 +116,10 @@ static const char * const iio_modifier_n [IIO_MOD_Q] = "q", [IIO_MOD_CO2] = "co2", [IIO_MOD_VOC] = "voc", @@ -123,7 +115,7 @@ index ac2de6b7e89f..f6b8003fbe3c 100644 }; static bool event_is_known(struct iio_event_data *event) -@@ -156,6 +161,7 @@ static bool event_is_known(struct iio_event_data *event) +@@ -156,6 +161,7 @@ static bool event_is_known(struct iio_ev case IIO_GRAVITY: case IIO_POSITIONRELATIVE: case IIO_PHASE: @@ -131,7 +123,7 @@ index ac2de6b7e89f..f6b8003fbe3c 100644 break; default: return false; -@@ -200,6 +206,10 @@ static bool event_is_known(struct iio_event_data *event) +@@ -200,6 +206,10 @@ static bool event_is_known(struct iio_ev case IIO_MOD_Q: case IIO_MOD_CO2: case IIO_MOD_VOC: diff --git a/target/linux/generic/backport-4.19/500-v5.1-iio-chemical-add-support-for-Sensirion-SPS30-sensor.patch b/target/linux/generic/backport-4.19/500-v5.1-iio-chemical-add-support-for-Sensirion-SPS30-sensor.patch index 73210b8e0e..d30c7c3cc1 100644 --- a/target/linux/generic/backport-4.19/500-v5.1-iio-chemical-add-support-for-Sensirion-SPS30-sensor.patch +++ b/target/linux/generic/backport-4.19/500-v5.1-iio-chemical-add-support-for-Sensirion-SPS30-sensor.patch @@ -14,8 +14,6 @@ Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> 3 files changed, 419 insertions(+) create mode 100644 drivers/iio/chemical/sps30.c -diff --git a/drivers/iio/chemical/Kconfig b/drivers/iio/chemical/Kconfig -index b8e005be4f87..57832b4360e9 100644 --- a/drivers/iio/chemical/Kconfig +++ b/drivers/iio/chemical/Kconfig @@ -61,6 +61,17 @@ config IAQCORE @@ -36,8 +34,6 @@ index b8e005be4f87..57832b4360e9 100644 config VZ89X tristate "SGX Sensortech MiCS VZ89X VOC sensor" depends on I2C -diff --git a/drivers/iio/chemical/Makefile b/drivers/iio/chemical/Makefile -index 2f4c4ba4d781..9f42f4252151 100644 --- a/drivers/iio/chemical/Makefile +++ b/drivers/iio/chemical/Makefile @@ -9,4 +9,5 @@ obj-$(CONFIG_BME680_I2C) += bme680_i2c.o @@ -46,9 +42,6 @@ index 2f4c4ba4d781..9f42f4252151 100644 obj-$(CONFIG_IAQCORE) += ams-iaq-core.o +obj-$(CONFIG_SPS30) += sps30.o obj-$(CONFIG_VZ89X) += vz89x.o -diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c -new file mode 100644 -index 000000000000..fa3cd409b90b --- /dev/null +++ b/drivers/iio/chemical/sps30.c @@ -0,0 +1,407 @@ diff --git a/target/linux/generic/backport-4.19/501-v5.1-iio-chemical-sps30-add-support-for-self-cleaning.patch b/target/linux/generic/backport-4.19/501-v5.1-iio-chemical-sps30-add-support-for-self-cleaning.patch index 9e4b9c2d43..7054fb0313 100644 --- a/target/linux/generic/backport-4.19/501-v5.1-iio-chemical-sps30-add-support-for-self-cleaning.patch +++ b/target/linux/generic/backport-4.19/501-v5.1-iio-chemical-sps30-add-support-for-self-cleaning.patch @@ -21,9 +21,6 @@ Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-sps30 -diff --git a/Documentation/ABI/testing/sysfs-bus-iio-sps30 b/Documentation/ABI/testing/sysfs-bus-iio-sps30 -new file mode 100644 -index 000000000000..e7ce2c57635e --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-iio-sps30 @@ -0,0 +1,8 @@ @@ -35,8 +32,6 @@ index 000000000000..e7ce2c57635e + Writing 1 starts sensor self cleaning. Internal fan accelerates + to its maximum speed and keeps spinning for about 10 seconds in + order to blow out accumulated dust. -diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c -index fa3cd409b90b..f3b4390c8f5c 100644 --- a/drivers/iio/chemical/sps30.c +++ b/drivers/iio/chemical/sps30.c @@ -7,7 +7,6 @@ @@ -55,7 +50,7 @@ index fa3cd409b90b..f3b4390c8f5c 100644 enum { PM1, -@@ -104,6 +104,7 @@ static int sps30_do_cmd(struct sps30_state *state, u16 cmd, u8 *data, int size) +@@ -104,6 +104,7 @@ static int sps30_do_cmd(struct sps30_sta break; case SPS30_STOP_MEAS: case SPS30_RESET: @@ -63,7 +58,7 @@ index fa3cd409b90b..f3b4390c8f5c 100644 ret = sps30_write_then_read(state, buf, 2, NULL, 0); break; case SPS30_READ_DATA_READY_FLAG: -@@ -275,7 +276,39 @@ static int sps30_read_raw(struct iio_dev *indio_dev, +@@ -275,7 +276,39 @@ static int sps30_read_raw(struct iio_dev return -EINVAL; } diff --git a/target/linux/generic/backport-4.19/502-v5.1-iio-chemical-sps30-allow-changing-self-cleaning-peri.patch b/target/linux/generic/backport-4.19/502-v5.1-iio-chemical-sps30-allow-changing-self-cleaning-peri.patch index ca3e23b8fc..3a1335ba44 100644 --- a/target/linux/generic/backport-4.19/502-v5.1-iio-chemical-sps30-allow-changing-self-cleaning-peri.patch +++ b/target/linux/generic/backport-4.19/502-v5.1-iio-chemical-sps30-allow-changing-self-cleaning-peri.patch @@ -14,8 +14,6 @@ Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/chemical/sps30.c | 143 +++++++++++++++--- 2 files changed, 145 insertions(+), 18 deletions(-) -diff --git a/Documentation/ABI/testing/sysfs-bus-iio-sps30 b/Documentation/ABI/testing/sysfs-bus-iio-sps30 -index e7ce2c57635e..143df8e89d08 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio-sps30 +++ b/Documentation/ABI/testing/sysfs-bus-iio-sps30 @@ -6,3 +6,23 @@ Description: @@ -42,8 +40,6 @@ index e7ce2c57635e..143df8e89d08 100644 + The range of available values in seconds represented as the + minimum value, the step and the maximum value, all enclosed in + square brackets. -diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c -index f3b4390c8f5c..376fac41ecb5 100644 --- a/drivers/iio/chemical/sps30.c +++ b/drivers/iio/chemical/sps30.c @@ -5,9 +5,6 @@ @@ -104,7 +100,7 @@ index f3b4390c8f5c..376fac41ecb5 100644 }; DECLARE_CRC8_TABLE(sps30_crc8_table); -@@ -107,6 +117,9 @@ static int sps30_do_cmd(struct sps30_state *state, u16 cmd, u8 *data, int size) +@@ -107,6 +117,9 @@ static int sps30_do_cmd(struct sps30_sta case SPS30_START_FAN_CLEANING: ret = sps30_write_then_read(state, buf, 2, NULL, 0); break; @@ -114,7 +110,7 @@ index f3b4390c8f5c..376fac41ecb5 100644 case SPS30_READ_DATA_READY_FLAG: case SPS30_READ_DATA: case SPS30_READ_SERIAL: -@@ -114,6 +127,15 @@ static int sps30_do_cmd(struct sps30_state *state, u16 cmd, u8 *data, int size) +@@ -114,6 +127,15 @@ static int sps30_do_cmd(struct sps30_sta size += size / 2; ret = sps30_write_then_read(state, buf, 2, buf, size); break; @@ -130,7 +126,7 @@ index f3b4390c8f5c..376fac41ecb5 100644 } if (ret) -@@ -170,6 +192,14 @@ static int sps30_do_meas(struct sps30_state *state, s32 *data, int size) +@@ -170,6 +192,14 @@ static int sps30_do_meas(struct sps30_st int i, ret, tries = 5; u8 tmp[16]; @@ -145,7 +141,7 @@ index f3b4390c8f5c..376fac41ecb5 100644 while (tries--) { ret = sps30_do_cmd(state, SPS30_READ_DATA_READY_FLAG, tmp, 2); if (ret) -@@ -276,6 +306,24 @@ static int sps30_read_raw(struct iio_dev *indio_dev, +@@ -276,6 +306,24 @@ static int sps30_read_raw(struct iio_dev return -EINVAL; } @@ -170,7 +166,7 @@ index f3b4390c8f5c..376fac41ecb5 100644 static ssize_t start_cleaning_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) -@@ -296,10 +344,82 @@ static ssize_t start_cleaning_store(struct device *dev, +@@ -296,10 +344,82 @@ static ssize_t start_cleaning_store(stru return len; } @@ -253,7 +249,7 @@ index f3b4390c8f5c..376fac41ecb5 100644 NULL }; -@@ -362,6 +482,7 @@ static int sps30_probe(struct i2c_client *client) +@@ -362,6 +482,7 @@ static int sps30_probe(struct i2c_client state = iio_priv(indio_dev); i2c_set_clientdata(client, indio_dev); state->client = client; @@ -261,7 +257,7 @@ index f3b4390c8f5c..376fac41ecb5 100644 indio_dev->dev.parent = &client->dev; indio_dev->info = &sps30_info; indio_dev->name = client->name; -@@ -373,19 +494,11 @@ static int sps30_probe(struct i2c_client *client) +@@ -373,19 +494,11 @@ static int sps30_probe(struct i2c_client mutex_init(&state->lock); crc8_populate_msb(sps30_crc8_table, SPS30_CRC8_POLYNOMIAL); @@ -282,7 +278,7 @@ index f3b4390c8f5c..376fac41ecb5 100644 ret = sps30_do_cmd(state, SPS30_READ_SERIAL, buf, sizeof(buf)); if (ret) { -@@ -395,12 +508,6 @@ static int sps30_probe(struct i2c_client *client) +@@ -395,12 +508,6 @@ static int sps30_probe(struct i2c_client /* returned serial number is already NUL terminated */ dev_info(&client->dev, "serial number: %s\n", buf); diff --git a/target/linux/generic/backport-4.19/503-v5.1-iio-chemical-sps30-remove-printk-format-specifier.patch b/target/linux/generic/backport-4.19/503-v5.1-iio-chemical-sps30-remove-printk-format-specifier.patch index 8cdd0a718d..b0fe5ac2e6 100644 --- a/target/linux/generic/backport-4.19/503-v5.1-iio-chemical-sps30-remove-printk-format-specifier.patch +++ b/target/linux/generic/backport-4.19/503-v5.1-iio-chemical-sps30-remove-printk-format-specifier.patch @@ -12,8 +12,6 @@ Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/chemical/sps30.c | 2 -- 1 file changed, 2 deletions(-) -diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c -index 376fac41ecb5..e03a28a67146 100644 --- a/drivers/iio/chemical/sps30.c +++ b/drivers/iio/chemical/sps30.c @@ -7,8 +7,6 @@ diff --git a/target/linux/generic/backport-4.19/504-v5.1-iio-chemical-sps30-fix-a-loop-timeout-test.patch b/target/linux/generic/backport-4.19/504-v5.1-iio-chemical-sps30-fix-a-loop-timeout-test.patch index e0fcdc2ce2..c0aae35549 100644 --- a/target/linux/generic/backport-4.19/504-v5.1-iio-chemical-sps30-fix-a-loop-timeout-test.patch +++ b/target/linux/generic/backport-4.19/504-v5.1-iio-chemical-sps30-fix-a-loop-timeout-test.patch @@ -13,11 +13,9 @@ Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> drivers/iio/chemical/sps30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c -index e03a28a67146..375df5060ed5 100644 --- a/drivers/iio/chemical/sps30.c +++ b/drivers/iio/chemical/sps30.c -@@ -210,7 +210,7 @@ static int sps30_do_meas(struct sps30_state *state, s32 *data, int size) +@@ -210,7 +210,7 @@ static int sps30_do_meas(struct sps30_st msleep_interruptible(300); } diff --git a/target/linux/generic/backport-4.19/505-v5.1-iio-chemical-sps30-Supress-some-switch-fallthrough-w.patch b/target/linux/generic/backport-4.19/505-v5.1-iio-chemical-sps30-Supress-some-switch-fallthrough-w.patch index a1c0b3ddca..08cc34ff40 100644 --- a/target/linux/generic/backport-4.19/505-v5.1-iio-chemical-sps30-Supress-some-switch-fallthrough-w.patch +++ b/target/linux/generic/backport-4.19/505-v5.1-iio-chemical-sps30-Supress-some-switch-fallthrough-w.patch @@ -13,11 +13,9 @@ Acked-by: Tomasz Duszynski <tduszyns@gmail.com> drivers/iio/chemical/sps30.c | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c -index 375df5060ed5..edbb956e81e8 100644 --- a/drivers/iio/chemical/sps30.c +++ b/drivers/iio/chemical/sps30.c -@@ -118,6 +118,7 @@ static int sps30_do_cmd(struct sps30_state *state, u16 cmd, u8 *data, int size) +@@ -118,6 +118,7 @@ static int sps30_do_cmd(struct sps30_sta case SPS30_READ_AUTO_CLEANING_PERIOD: buf[0] = SPS30_AUTO_CLEANING_PERIOD >> 8; buf[1] = (u8)SPS30_AUTO_CLEANING_PERIOD; @@ -25,7 +23,7 @@ index 375df5060ed5..edbb956e81e8 100644 case SPS30_READ_DATA_READY_FLAG: case SPS30_READ_DATA: case SPS30_READ_SERIAL: -@@ -295,6 +296,8 @@ static int sps30_read_raw(struct iio_dev *indio_dev, +@@ -295,6 +296,8 @@ static int sps30_read_raw(struct iio_dev *val2 = 10000; return IIO_VAL_INT_PLUS_MICRO; diff --git a/target/linux/generic/backport-4.19/506-v5.1-iio-chemical-sps30-Explicity-truncate-constant-by-ma.patch b/target/linux/generic/backport-4.19/506-v5.1-iio-chemical-sps30-Explicity-truncate-constant-by-ma.patch index 6b31483070..e1f4a3b635 100644 --- a/target/linux/generic/backport-4.19/506-v5.1-iio-chemical-sps30-Explicity-truncate-constant-by-ma.patch +++ b/target/linux/generic/backport-4.19/506-v5.1-iio-chemical-sps30-Explicity-truncate-constant-by-ma.patch @@ -18,11 +18,9 @@ Acked-by: Tomasz Duszynski <tduszyns@gmail.com> drivers/iio/chemical/sps30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c -index edbb956e81e8..acb9f8ecbb3d 100644 --- a/drivers/iio/chemical/sps30.c +++ b/drivers/iio/chemical/sps30.c -@@ -117,7 +117,7 @@ static int sps30_do_cmd(struct sps30_state *state, u16 cmd, u8 *data, int size) +@@ -117,7 +117,7 @@ static int sps30_do_cmd(struct sps30_sta break; case SPS30_READ_AUTO_CLEANING_PERIOD: buf[0] = SPS30_AUTO_CLEANING_PERIOD >> 8; diff --git a/target/linux/generic/backport-4.19/507-v5.6-iio-chemical-sps30-fix-missing-triggered-buffer-depe.patch b/target/linux/generic/backport-4.19/507-v5.6-iio-chemical-sps30-fix-missing-triggered-buffer-depe.patch index a2b274f75e..c2b999b1cb 100644 --- a/target/linux/generic/backport-4.19/507-v5.6-iio-chemical-sps30-fix-missing-triggered-buffer-depe.patch +++ b/target/linux/generic/backport-4.19/507-v5.6-iio-chemical-sps30-fix-missing-triggered-buffer-depe.patch @@ -17,11 +17,9 @@ Signed-off-by: Petr Štetiar <ynezz@true.cz> drivers/iio/chemical/Kconfig | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/drivers/iio/chemical/Kconfig b/drivers/iio/chemical/Kconfig -index 0b91de4df8f4..a7e65a59bf42 100644 --- a/drivers/iio/chemical/Kconfig +++ b/drivers/iio/chemical/Kconfig -@@ -91,6 +91,8 @@ config SPS30 +@@ -65,6 +65,8 @@ config SPS30 tristate "SPS30 particulate matter sensor" depends on I2C select CRC8 |