-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Adds read-only property for the I2C EEPROM Target #75777
base: main
Are you sure you want to change the base?
Adds read-only property for the I2C EEPROM Target #75777
Conversation
aba8e43
to
b119543
Compare
b119543
to
0aa34cf
Compare
2e4621a
to
2abe1e1
Compare
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.
Looks good! Now all that's needed is a corresponding test case in tests/drivers/i2c/i2c_target_api/
👍
Good point, I will figure out how and update the PR once done. |
@henrikbrixandersen I am thinking about adding another EEPROM which is read-only to the device tree overlays within the test project. Also an EEPROM with 16bit addressing should be added to increase test coverage of the existing code which also supports this since a couple of months. I could probably do that at the same time. Does this sound like the right approach to you? |
Yes, that sounds good along with some accompanying test cases. |
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. |
I took this up again as I was busy with other stuff during the last months. I tried to run the existing test on a RPi Pico but couldn't get it to work until now. What hardware setup is needed to run those tests? |
2abe1e1
to
b6d33a6
Compare
@henrikbrixandersen I finally had the time to write a simple test and I pushed my work in progress. Some questions:
|
9816428
to
0db9102
Compare
In case the EEPROM data stored in the buffer shall be not writable from the I2C interface, the read-only property can now be set in the device tree. Signed-off-by: Manuel Aebischer <[email protected]>
f136954
to
7d2aeea
Compare
This additional test case verifies that an i2c_eeprom_target, which is set as read-only in the device tree cannot be written from the I2C bus. Signed-off-by: Manuel Aebischer <[email protected]>
7d2aeea
to
800ce8d
Compare
Okay, I saw that the boards are tested in CI, so I can safely add it to the overlays without breaking the tests |
In case the EEPROM data stored in the buffer shall be not writable from the I2C interface, the read-only property can now be set in the device tree.