Skip to content

Conversation

@it-klinger
Copy link
Contributor

  • add driver for Vishay VEML6046 RGBIR color sensor
  • add new compatible "vishay,veml6046"
  • support fetch and get sensor subsystem operations
  • triggered mode and interrupts are not yet supported
  • add attribution test application which tests all attribute combinations

uint32_t green_lux;
uint32_t blue_lux;
uint32_t ir_lux;
uint32_t int_flags;
Copy link
Contributor

Choose a reason for hiding this comment

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

unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unused. I'll remove.

Comment on lines 401 to 367
case SENSOR_ATTR_LOWER_THRESH:
val->val1 = data->thresh_low;
break;
case SENSOR_ATTR_UPPER_THRESH:
val->val1 = data->thresh_high;
break;
Copy link
Contributor

Choose a reason for hiding this comment

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

should convert back to lux

return ret;
}

ret = veml6046_read16(dev, VEML6046_CMDCODE_INT_L, val);
Copy link
Contributor

Choose a reason for hiding this comment

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

may want to actually check ret?

sensor_channel_get(dev, SENSOR_CHAN_RED, &red);
sensor_channel_get(dev, SENSOR_CHAN_VEML6046_RED_RAW_COUNTS, &red_raw);

sensor_channel_get(dev, SENSOR_CHAN_RED, &green);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sensor_channel_get(dev, SENSOR_CHAN_RED, &green);
sensor_channel_get(dev, SENSOR_CHAN_GREEN, &green);

sensor_channel_get(dev, SENSOR_CHAN_RED, &green);
sensor_channel_get(dev, SENSOR_CHAN_VEML6046_GREEN_RAW_COUNTS, &green_raw);

sensor_channel_get(dev, SENSOR_CHAN_RED, &blue);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sensor_channel_get(dev, SENSOR_CHAN_RED, &blue);
sensor_channel_get(dev, SENSOR_CHAN_BLUE, &blue);

sensor_channel_get(dev, SENSOR_CHAN_RED, &blue);
sensor_channel_get(dev, SENSOR_CHAN_VEML6046_BLUE_RAW_COUNTS, &blue_raw);

sensor_channel_get(dev, SENSOR_CHAN_RED, &ir);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sensor_channel_get(dev, SENSOR_CHAN_RED, &ir);
sensor_channel_get(dev, SENSOR_CHAN_IR, &ir);

@it-klinger it-klinger force-pushed the add-veml6046 branch 4 times, most recently from 565677d to d7051b9 Compare May 26, 2025 13:18
@sonarqubecloud
Copy link

@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Jul 26, 2025
@github-actions github-actions bot closed this Aug 10, 2025
@it-klinger
Copy link
Contributor Author

Hi,
can anybody review the patch, please?
I think i changed everything according to the review or did i miss something?

@kartben
Copy link
Contributor

kartben commented Aug 10, 2025

Hi,
can anybody review the patch, please?
I think i changed everything according to the review or did i miss something?

It will be possible as soon as you restore https://github.com/it-klinger/zephyr/tree/add-veml6046 to commit d7051b9 which is what it was when the PR was closed. Hope this helps!

@it-klinger
Copy link
Contributor Author

Hi Benjamin,
i restored to d7051b9 and also did a small change and force commited, but the PR is not opening again.

@kartben
Copy link
Contributor

kartben commented Aug 10, 2025

Hi Benjamin,
i restored to d7051b9 and also did a small change and force commited, but the PR is not opening again.

It's only when the branch is exactly at that commit that reopening will be possible. The follow-up commit will have to be done afterwards

@kartben
Copy link
Contributor

kartben commented Aug 10, 2025

Hi Benjamin,
i restored to d7051b9 and also did a small change and force commited, but the PR is not opening again.

It's only when the branch is exactly at that commit that reopening will be possible. The follow-up commit will have to be done afterwards

And right now neither of the two commits are d705 anyway main...it-klinger:zephyr:add-veml6046

@it-klinger
Copy link
Contributor Author

it-klinger commented Aug 10, 2025

Now it's at d705 but i'm only able to open a PR with a new number (#94305), but the closed one is not opened.

@kartben kartben reopened this Aug 10, 2025
josuah
josuah previously approved these changes Oct 19, 2025
Copy link
Contributor

@josuah josuah left a comment

Choose a reason for hiding this comment

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

Thank you for the successive modifications and improvements!

kartben
kartben previously approved these changes Oct 20, 2025
MaureenHelm
MaureenHelm previously approved these changes Oct 20, 2025
@MaureenHelm
Copy link
Member

Rebase needed

- add driver for Vishay VEML6046 RGBIR color sensor
- add new compatible "vishay,veml6046"
- support fetch and get sensor subsystem operations
- triggered mode and interrupts are not yet supported

Signed-off-by: Andreas Klinger <[email protected]>
- Test all attribute combinations of Vishay RGBIR color sensor VEML6046.
- Print OVERFLOW in case of saturation of sensor.
- This small program is intended to be helping when finding appropriate
  attributes for an application of the sensor.

Signed-off-by: Andreas Klinger <[email protected]>
@it-klinger
Copy link
Contributor Author

Just rebased.

@it-klinger
Copy link
Contributor Author

Reopened.

@it-klinger it-klinger reopened this Oct 22, 2025
@it-klinger it-klinger dismissed stale reviews from MaureenHelm, kartben, and josuah via 6977338 October 22, 2025 17:20
@zephyrbot zephyrbot requested a review from MaureenHelm October 22, 2025 17:21
- create common header file veml60xx-common.h for sensors VEML6031 and
  VEML6046.

Signed-off-by: Andreas Klinger <[email protected]>
@sonarqubecloud
Copy link

@it-klinger
Copy link
Contributor Author

@MaureenHelm @kartben @josuah

Rebasing done.

@cfriedt cfriedt merged commit c93788a into zephyrproject-rtos:main Oct 22, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: Devicetree Bindings area: Samples Samples area: Sensors Sensors area: Tests Issues related to a particular existing or missing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants