Google Summer of Code 2018
IIO Driver Project (Bosch BME680)
The project aimed to write a device driver for Bosch BME680(4-in-1) sensor module using the Industrial I/O interface to effectively read data from each of the four channels which are Temperature, Pressure, Humidity and Gas. The sensor communicates via I2C and SPI communication protocol and the captured data read from the sensor is transported from kernelspace to userspace using the sysfs bindings to the IIO core. The goal is also to add support for triggered buffer readings from each of the channels to efficiently read samples. Finally, power management support is also required to support suspend/resume functions.
- Effective reading of data through sysfs attributes with processed output from each of the channels:
- Oversampling setting support from userspace through sysfs.
- Advanced Configuration and Power Interface(ACPI) support.
- I2C and SPI communication interface support with each having a separate kernel module.
- bme680_i2c.c -- implementing I2C interface.
- bme680_spi.c -- implementing SPI interface.
- bme680_core.c -- implementing generic core functionalities.
- IIR filter support to overcome short noise fluctuations.
- Triggered Buffer Interface: The buffer trigger interface allows capturing cotinuous readings from the sensor.
- Power Managment: It enables support of basic power managment functions such as suspend/resume to save power.
Ongoing - Discussions: https://marc.info/?t=153295283200001&r=1&w=2;
Final merged driver code for 4.19 kernel release: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1b3bd8592780c87c5eddabbe98666b086bbaee36
Incremental Blog series: https://himanshujha199640.wordpress.com/2018/05/10/introduction
Special thanks to:
- Daniel Baluta (Mentor) [Software Enginner @ NXP Semiconductors, Romania]
- Jonathan Cameron (IIO subsytem maintainer) [Principal Enginner @ Huawei Technologies, U.K]
- Matt Ranostay (Reviewer) [Senior Software Engineer @ Konsulko Group, Washington]
- David Frey (Reviewer) [Senior Staff Engineer @ Sierra Wireless, Canada]
- Andy Shevchenko (Reviewer) [Linux Driver Engineer @ Intel Corporation, Finland]
- Bosch Sensortec GmbH Germany (Allowing use of compensation functions API)
And Greg Kroah-Hartman(Linux Foundation) for funding the hardware required for the project.