linux-stable/drivers/iio
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
..
accel Second set of IIO new device support, features and cleanups. 2018-07-25 10:12:07 +02:00
adc iio: adc: meson-saradc: add support for the Meson8m2 SoCs 2018-07-23 19:18:13 +01:00
afe iio: afe: rescale: new driver 2018-04-28 18:03:22 +01:00
amplifiers iio: amplifiers: ad8366: move channel init before iio_device_register() 2018-05-22 18:13:45 +01:00
buffer iio:kfifo_buf: check for uint overflow 2018-03-30 11:16:12 +01:00
chemical iio: chemical: Add support for Bosch BME680 sensor 2018-07-28 11:38:46 +01:00
common iio: change strncpy+truncation to strlcpy 2018-07-15 11:38:06 +01:00
counter iio: 104-quad-8: Provide defines for magic numbers 2018-06-10 11:52:30 +01:00
dac iio: dac: Add AD5758 support 2018-07-07 18:16:32 +01:00
dummy iio:dummy: Add extra paragraphs on Kconfig 2018-03-03 15:20:16 +00:00
frequency iio: ad9523: support for external signals via gpios 2018-07-28 10:41:14 +01:00
gyro iio: Replace occurrences of magic number 0 by IIO_CHAN_INFO_RAW 2018-03-07 20:14:36 +00:00
health iio: add SPDX identifier for various drivers 2018-02-18 11:55:19 +00:00
humidity iio: add SPDX identifier for various drivers 2018-02-18 11:55:19 +00:00
imu Second set of IIO new device support, features and cleanups. 2018-07-25 10:12:07 +02:00
light Second set of IIO new device support, features and cleanups. 2018-07-25 10:12:07 +02:00
magnetometer iio: magnetometer: mag3110: Add ability to run in continuous mode 2018-05-12 11:01:59 +01:00
multiplexer treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
orientation
potentiometer iio: potentiometer: mcp4531: switch to using .probe_new 2018-04-15 18:12:51 +01:00
potentiostat iio: potentiostat: lmp91000: add LMP91002 support 2018-05-12 11:02:44 +01:00
pressure Second set of IIO new device support, features and cleanups. 2018-07-25 10:12:07 +02:00
proximity iio: light: isl29501: Add support for the ISL29501 ToF sensor. 2018-07-23 19:18:10 +01:00
resolver staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00
temperature iio temperature/mlx90632: silence a static checker warning 2018-02-24 13:32:05 +00:00
trigger iio: stm32: Adopt SPDX identifier 2018-01-08 16:03:41 +01:00
iio_core.h
iio_core_trigger.h
industrialio-buffer.c First round of IIO fixes for the 4.16 cycle. 2018-02-20 10:03:22 +01:00
industrialio-configfs.c
industrialio-core.c iio: Add modifier for DUV light 2018-07-23 19:18:10 +01:00
industrialio-event.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
Kconfig staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00
Makefile staging: iio: ad2s1200: Move driver out of staging 2018-05-20 12:17:48 +01:00