-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[WIP] drivers: i2c: Add dts support for i2c slaves. #9943
[WIP] drivers: i2c: Add dts support for i2c slaves. #9943
Conversation
1292c21
to
75bb87c
Compare
Codecov Report
@@ Coverage Diff @@
## master #9943 +/- ##
=======================================
Coverage 52.58% 52.58%
=======================================
Files 213 213
Lines 26148 26148
Branches 5636 5636
=======================================
Hits 13749 13749
Misses 10145 10145
Partials 2254 2254 Continue to review full report at Codecov.
|
drivers/i2c/slave/Kconfig.eeprom
Outdated
hex "I2C Slave EEPROM 1 address" | ||
depends on I2C_EEPROM_SLAVE_1 | ||
default 0x56 | ||
default n |
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 line can be removed.
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.
removed
scripts/dts/extract/globals.py
Outdated
for k, v in root['children']['aliases']['props'].items(): | ||
print(k) | ||
print(v) |
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.
These look like debug statements and should be removed
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.
removed
dts/bindings/i2c/i2c-slave.yaml
Outdated
# | ||
--- | ||
title: I2C Slave Base Structure | ||
id: i2c-slave |
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.
Can this become i2c-device instead of i2c-slave?
Convention in e.g. PR #9876 is to call devices that are attached to a bus a [bus]-device. Adhering to this convention could help in the extraction of device tree properties.
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.
Removed this file and switched to using i2c-device
Adding i2c slave requires overlay with node definitions and proper aliases depending on driver implementation. Modified i2c_slave_api test to use information from dts. Signed-off-by: Mieszko Mierunski <[email protected]>
75bb87c
to
de228ec
Compare
Adding i2c slave requires overlay with node definitions and
proper aliases depending on driver implementation.
Modified i2c_slave_api test to use information from dts.
To fully complete this PR, i2c_virtual driver has to be also contained in dts, however I don't know if it should be put among other drivers or in some special place.
Fixes #9920