1
0
Fork 0
Commit Graph

18 Commits (redonkable)

Author SHA1 Message Date
Petr Štetiar 69399842e4 iio: chemical: sps30: fix missing triggered buffer dependency
commit 016a8845f6 upstream.

SPS30 uses triggered buffer, but the dependency is not specified in the
Kconfig file.  Fix this by selecting IIO_BUFFER and IIO_TRIGGERED_BUFFER
config symbols.

Cc: stable@vger.kernel.org
Fixes: 232e0f6dde ("iio: chemical: add support for Sensirion SPS30 sensor")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 08:25:53 +01:00
Tomasz Duszynski 6786d6a4f3 iio: chemical: pms7003: fix unmet triggered buffer dependency
commit 217afe63cc upstream.

IIO triggered buffer depends on IIO buffer which is missing from Kconfig
file. This should go unnoticed most of the time because there's a
chance something else has already enabled buffers. In some rare cases
though one might experience kbuild warnings about unmet direct
dependencies and build failures due to missing symbols.

Fix this by selecting IIO_BUFFER explicitly.

Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
Fixes: a1d642266c ("iio: chemical: add support for Plantower PMS7003 sensor")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-23 08:22:33 +01:00
Thomas Gleixner ec8f24b7fa treewide: Add SPDX license identifier - Makefile/Kconfig
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 10:50:46 +02:00
Greg Kroah-Hartman 817de6b859 Merge 5.1-rc6 into staging-next
We want the fixes in here as well as this resolves an iio driver merge
issue.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-21 23:18:44 +02:00
Enrico Weigelt, metux IT consult d626be00e8 drivers: iio: Kconfig: pedantic cleanup
Formatting of Kconfig files doesn't look so pretty, so just
take damp cloth and clean it up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04 20:19:56 +01:00
Arnd Bergmann f6a7bf2ccf iio: pms7003: select IIO_TRIGGERED_BUFFER
Without IIO_TRIGGERED_BUFFER, this driver fails to link:

drivers/iio/chemical/pms7003.o: In function `pms7003_probe':
pms7003.c:(.text+0x21c): undefined reference to `devm_iio_triggered_buffer_setup'
pms7003.c:(.text+0x21c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `devm_iio_triggered_buffer_setup'

Fixes: a1d642266c ("iio: chemical: add support for Plantower PMS7003 sensor")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tomasz Duszynski <tduszyns@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-03-16 16:34:56 +00:00
Jonathan Cameron 831d2fefdf iio: chemical: fix missing Kconfig block for sgp30
I clearly messed up applying this patch. Not sure
how but the entire Kconfig block is missing. This
patch puts it back as it was in the original patch.

Reported-by: Andreas Brauchli <a.brauchli@elementarea.net>
Fixes: ce51412416 ("iio: chemical: sgp30: Support Sensirion SGP30/SGPC3 sensors")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-03-09 16:59:03 +00:00
Tomasz Duszynski a1d642266c iio: chemical: add support for Plantower PMS7003 sensor
Add support for Plantower PMS7003 particulate matter sensor.

Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-02-11 20:19:33 +00:00
Tomasz Duszynski 232e0f6dde iio: chemical: add support for Sensirion SPS30 sensor
Add support for Sensirion SPS30 particulate matter sensor.

Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-12-16 14:05:58 +00:00
Himanshu Jha 1b3bd85927 iio: chemical: Add support for Bosch BME680 sensor
Bosch BME680 is a 4-in-1 sensor with temperature, pressure, humidity
and gas sensing capability. It supports both I2C and SPI communication
protocol for effective data communication.

The device supports two modes:

1. Sleep mode
2. Forced mode

The measurements only takes place when forced mode is triggered and a
single TPHG cycle is performed by the sensor. The sensor automatically
goes to sleep after afterwards.

The device has various calibration constants/parameters programmed into
devices' non-volatile memory(NVM) during production and can't be altered
by the user. These constants are used in the compensation functions to
get the required compensated readings along with the raw data. The
compensation functions/algorithms are provided by Bosch Sensortec GmbH
via their API[1]. As these don't change during the measurement cycle,
therefore we read and store them at the probe. The default configs
supplied by Bosch are also set at probe.

0-day tested with build success.

GSoC-2018: https://summerofcode.withgoogle.com/projects/#6691473790074880
Mentor: Daniel Baluta
[1] https://github.com/BoschSensortec/BME680_driver
Datasheet:
https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME680-DS001-00.pdf

Note from Jonathan: The compensation functions are 'interesting' and
could do with a tidy up in future.  However, they work so we can leave that
for another day.

Cc: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-28 11:38:46 +01:00
Narcisa Ana Maria Vasile 283d26917a iio: chemical: ccs811: Add triggered buffer support
A software trigger such as hrtimer can be used to capture the data
that will be stored in the buffer.

Cc: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-18 08:08:02 +01:00
Narcisa Ana Maria Vasile a94c24a712 iio: chemical: ccs811: Add support for AMS CCS811 VOC sensor
Add support for CCS811 VOC sensor. This patch adds support
for reading current and voltage across the sensor and TVOC
and equivalent CO2 values.

Scale and offset values have been computed according to datasheet:
    - For current: raw value is in microamps
        => 0.001 scale to convert to milliamps
    - For voltage: 1.65V = 1023, therefore 1650mV = 1023
        => 1650.0/1023 = 1.612903 scale to convert to millivolts
    - For eCO2: raw value range is from 400ppm to 8192ppm.
        => (val - 400) * (100 - 0) / (8192 - 400) + 0 =
           (val - 400) * 0.01283367 => offset: -400, scale = 0.012834
           to get a percentage value
    -For TVOC: raw value range is from 0ppb to 1187ppb.
        => (val - 0) * 100 / (1187 - 0) + 0 = val * 0.0842459 =>
            scale = 0.084246 for getting a percentage value

Cc: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-07-22 21:16:37 +01:00
Matt Ranostay ce08cc986e iio: chemical: atlas-ph-sensor: add ORP feature
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-08-21 11:59:53 +01:00
Matt Ranostay e8dd92bfbf iio: chemical: atlas-ph-sensor: add EC feature
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-05-29 20:03:23 +01:00
Arnd Bergmann 3b31b783ad iio: chemical: select IRQ_WORK for ATLAS ph sensor
The newly added atlas-ph-sensor driver uses irq_work_queue, which
may not always be enabled:

ERROR: "irq_work_queue" [drivers/iio/chemical/atlas-ph-sensor.ko] undefined!

This adds a 'select' statement to Kconfig to ensure it's there
when we need it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 27dec00ecf ("iio: chemical: add Atlas pH-SM sensor support")
Reviewed-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-06 18:36:58 +00:00
Matt Ranostay 27dec00ecf iio: chemical: add Atlas pH-SM sensor support
Add support for the Atlas Scientific pH-SM chemical sensor that can
detect pH levels of solutions in the range of 0-14.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-01-30 16:27:17 +00:00
Matt Ranostay 466df4d0c1 iio: chemical: add AMS iAQ-core support
Add support for AMS iAQ-core continuous and pulsed VOC sensors.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-12-12 15:07:38 +00:00
Matt Ranostay cd8d97774f iio: chemical: add SGX VZ89x VOC sensor support
Add support for VZ89X sensors VOC and CO2 reporting channels in
percentage which can be converted to part per million.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-09-23 20:23:26 +01:00