Skip to content

drivers: sensor: veml6031: add timeout to data-ready polling loop - #5

Draft
nateinaction wants to merge 1 commit into
v4.4.1-basefrom
fix/veml6031-timeout
Draft

drivers: sensor: veml6031: add timeout to data-ready polling loop#5
nateinaction wants to merge 1 commit into
v4.4.1-basefrom
fix/veml6031-timeout

Conversation

@nateinaction

Copy link
Copy Markdown

Replace unbounded while(1) loop with timeout-aware polling to prevent indefinite hangs if the sensor fails to signal data-ready. The timeout is calculated from the configured integration time plus a 50ms safety buffer, with a 500ms fallback for invalid settings.

Returns -ETIMEDOUT if data-ready is not received within the timeout period.

Replace unbounded while(1) loop with timeout-aware polling to prevent
indefinite hangs if the sensor fails to signal data-ready. The timeout
is calculated from the configured integration time plus a 50ms safety
buffer, with a 500ms fallback for invalid settings.

Returns -ETIMEDOUT if data-ready is not received within the timeout
period.
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9313c258-1a71-4bee-8efa-f128bab7639d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant