= Google Summer of Code 2018 = == IIO Driver Project (Bosch BME680) == The project aimed to write a device driver for [[ https://www.bosch-sensortec.com/bst/products/all_products/bme680 | 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. == Accomplishment == * Effective reading of data through sysfs attributes with processed output from each of the channels: * Temperature. * Pressure. * Humidity. * Gas. * 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. == TO-DO == * 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; == Patches == * RFC : https://marc.info/?t=152960352900055&r=1&w=2 * v2 : https://marc.info/?t=153086348500005&r=1&w=2 * v3 : https://marc.info/?t=153131126200007&r=1&w=2 * v4 : https://marc.info/?t=153212245700001&r=1&w=2 * v5 : https://marc.info/?t=153260504000004&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 == Acknowledgement == 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. == Links == GSoC'18 Project: https://summerofcode.withgoogle.com/archive/2018/projects/6296586405543936/ Documentation: https://www.kernel.org/doc/html/latest/driver-api/iio/index.html Youtube: * [[ https://www.youtube.com/watch?v=lBU77crSvcI&feature=youtu.be | Industial I/O And You by Matt Ranostay]] * [[ https://www.youtube.com/watch?v=CS9NuRBzN5Y&feature=youtu.be | libiio - Access to Sensor Devices Made Easy by Lars-Peter Clausen ]] Slides: [[ https://events.static.linuxfound.org/sites/events/files/slides/lceu15_baluta.pdf | Industrial I/O Subsystem: The Home of Linux Sensors ]]