Skip to content
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

Merged
merged 1 commit into from
Sep 24, 2018

Conversation

Mierunski
Copy link
Collaborator

@Mierunski Mierunski commented Sep 12, 2018

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

@codecov-io
Copy link

codecov-io commented Sep 12, 2018

Codecov Report

Merging #9943 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0287a04...de228ec. Read the comment docs.

hex "I2C Slave EEPROM 1 address"
depends on I2C_EEPROM_SLAVE_1
default 0x56
default n
Copy link
Member

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

for k, v in root['children']['aliases']['props'].items():
print(k)
print(v)
Copy link
Member

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

#
---
title: I2C Slave Base Structure
id: i2c-slave
Copy link
Collaborator

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.

Copy link
Collaborator Author

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants