Guidance Required for Contributing a New Sensor Driver to Zephyr/NCS

Hi everyone,

I have created a new sensor driver using the Zephyr Sensor API, including support for:

  • sample_fetch()

  • channel_get()

  • attr_set()

  • attr_get()

  • trigger handling

I developed the driver completely using Zephyr APIs and infrastructure, including:

  • <zephyr/device.h>

  • <zephyr/drivers/i2c.h>

  • <zephyr/drivers/gpio.h>

  • <zephyr/drivers/sensor.h>

  • <zephyr/sys/util.h>

Now I would like to contribute this sensor driver to Zephyr/NCS.

I checked the Zephyr contribution guide:
https://docs.nordicsemi.com/bundle/ncs-1.0.0/page/zephyr/contribute/index.html

However, I could not clearly understand the complete workflow for contributing a new sensor driver.

Could someone please provide a detailed explanation or step-by-step guide for:

  1. Where the driver should be added in Zephyr

  2. Required files (Kconfig, CMakeLists, DTS bindings, documentation, sample, tests, etc.)

  3. Coding style and checkpatch requirements

  4. How to create the GitHub pull request properly

  5. Whether contribution should go directly to Zephyr upstream or first into NCS

  6. Any mandatory CI/tests before submission

It would be very helpful for me to understand the proper contribution process.

Best regards,
Milan

Related