-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add support Rohm bh1750 ambient light sensor #53815
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
Add support Rohm bh1750 ambient light sensor #53815
Conversation
|
DT binding looks ok. |
MaureenHelm
left a comment
There was a problem hiding this 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 contribution!
Please add this sensor to tests/drivers/build_all/sensor to ensure it builds in CI, and also address requested changes by amending your comments and force pushing.
|
Please implement requested changes by amending the original commit rather than adding new commits. You also need to rebase to resolve merge conflicts. |
7b6ed2a to
4704fa2
Compare
I have added the modifitions according to comments and then stashed all commits into the original commit. Then, I have merge, however, the merge has provoked a new commit. I am not sure if it is rigth, may you confirm it? Thank you in advance |
No, you need to rebase on the command line, not in the GH web interface, to remove the merge commit |
e8745d9 to
662ce18
Compare
Ok, I understood. I think that it is now correct. It has passed all automated tests. Please, check it out. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please set the address to 0x55 to make it sequential. Note this is a build test that will never run on real hardware
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see it. However, the previous one test_i2c_as5600 is incorrect and should be 64 to follow the correct numbering. Thus, I propose to set the test_i2c_bh1750 address to 0x65.
662ce18 to
e06d735
Compare
d9ab80e to
9efa211
Compare
57dd6bb to
98ccee9
Compare
|
Hi @MaureenHelm and @teburd, it's some days since my latest changes and it passed all tests, I would like to know if something else is missing from my side. Thank you in advance. |
We're currently in feature freeze and need to wait until the merge window reopens after the release. |
|
@jeronimoagullo can you rebase please? |
f006cca
98ccee9 to
f006cca
Compare
I have just rebased and pushed. I have merged my contribution with the commit of same sensor with which it was conflicting |
|
@jeronimoagullo can you fix the compliance checks: |
Update Rohm bh1750 ambient light sensor driver. Signed-off-by: Jeronimo Agullo <[email protected]>
bcefeee to
5439282
Compare
Thank you for your comments, it's now done. |
MaureenHelm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sensor: Rohm bh1750 ambient light sensor
Update Rohm bh1750 ambient light sensor driver.
Signed-off-by: Jeronimo Agullo <[email protected]>
Please explain why you are updating the driver in the commit message.
| # BH1750 ambient light sensor configuration options | ||
|
|
||
| # Copyright (c) 2022 Michal Morsisko | ||
| # Copyright (c) 2023 Sngular People SL. Jeronimo Agullo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You haven't made any changes to this file; don't add your copyright.
| * for more information how to convert raw sample to lx | ||
| */ | ||
| tmp = (drv_data->sample * 1000 / 12) * (BH1750_DEFAULT_MTREG * 100 / cfg->mtreg); | ||
| if (attr == SENSOR_ATTR_CONFIGURATION) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could benefit from a more meaningful name, something like MEASUREMENT_MODE
|
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. |
Product Homepage:
https://www.rohm.com/
DataSheet:
https://www.farnell.com/datasheets/1813320.pdf
Testing Environment:
STMicroelectronics B_L4S5I_IOT01A Discovery kit
Signed-off-by: Jeronimo Agullo Ocampos [email protected]