Skip to content

drivers: sensor: Add support for BH1730 ambient light sensor #89908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rtborg
Copy link

@rtborg rtborg commented May 13, 2025

This commit adds support for BH1730 ambient light sensor.

@github-actions github-actions bot added the area: Sensors Sensors label May 13, 2025
Copy link

Hello @rtborg, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the BH1730 ambient light sensor by introducing a new sensor driver, device tree bindings, and associated build changes.

  • Added a new sensor node in the DTS test file.
  • Introduced DTS binding YAML for the BH1730 sensor.
  • Implemented the sensor driver with configuration (Kconfig, CMakeLists.txt) and driver source code.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/drivers/build_all/sensor/i2c.dtsi Added sensor node for BH1730.
dts/bindings/sensor/rohm,bh1730.yaml New DTS binding file describing sensor properties and defaults.
drivers/sensor/rohm/bh1730/bh1730.c New driver code implementing sensor functionality.
drivers/sensor/rohm/bh1730/Kconfig Added configuration options for the BH1730 sensor.
drivers/sensor/rohm/bh1730/CMakeLists.txt Build file listing new driver source.
drivers/sensor/rohm/Kconfig Updated to include the new sensor driver Kconfig.
drivers/sensor/rohm/CMakeLists.txt Updated to add the BH1730 subdirectory when enabled.
Comments suppressed due to low confidence (1)

drivers/sensor/rohm/bh1730/bh1730.c:29

  • The constant 'BH1730_CONTORL_ADC_EN_POWER_ON_SINGLE_READING' is misspelled; consider renaming it to 'BH1730_CONTROL_ADC_EN_POWER_ON_SINGLE_READING' for clarity.
#define BH1730_CONTORL_ADC_EN_POWER_ON_SINGLE_READING 0x0B

@rtborg rtborg force-pushed the bh1730_sensor branch 2 times, most recently from 9e03ed6 to 9f7d049 Compare May 16, 2025 20:18
@rtborg rtborg requested a review from kartben May 19, 2025 20:30
@rtborg rtborg force-pushed the bh1730_sensor branch 2 times, most recently from 0e381c6 to 37abf2c Compare May 22, 2025 19:50
@rtborg
Copy link
Author

rtborg commented May 23, 2025

Are there any other comments which need addressing?

Copy link
Member

@MaureenHelm MaureenHelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small nits, but otherwise LGTM

This commit adds support for BH1730 ambient light sensor.

Signed-off-by: Borislav Kereziev <b.kereziev@gmail.com>
Copy link

@rtborg rtborg requested a review from MaureenHelm May 24, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants