KernelNewbies
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Kernel Hacking

  • Frontpage

  • Kernel Hacking

  • Kernel Documentation

  • Kernel Glossary

  • FAQ

  • Found a bug?

  • Kernel Changelog

  • Upstream Merge Guide

Projects

  • KernelJanitors

  • KernelMentors

  • KernelProjects

Community

  • Why a community?

  • Regional Kernelnewbies

  • Personal Pages

  • Upcoming Events

References

  • Mailing Lists

  • Related Sites

  • Programming Links

Wiki

  • Recent Changes

  • Site Editors

  • Side Bar

  • Tips for Editors

  • Hosted by WikiWall

Navigation

  • RecentChanges
  • FindPage
  • HelpContents

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 1 as of 2018-08-08 14:25:59
KernelNewbies:
  • HimanshuJha
  • GSoC18

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.

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/next/linux-next.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/projects/#6691473790074880

Documentation: https://www.kernel.org/doc/html/latest/driver-api/iio/index.html

Youtube:

  • Industial I/O And You by Matt Ranostay

  • libiio - Access to Sensor Devices Made Easy by Lars-Peter Clausen

Slides: Industrial I/O Subsystem: The Home of Linux Sensors

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01