Skip to content

I2C: introduce and adapt new I2C interface (2nd attempt)#9548

Merged
smlng merged 162 commits intomasterfrom
new_i2c_if3
Aug 2, 2018
Merged

I2C: introduce and adapt new I2C interface (2nd attempt)#9548
smlng merged 162 commits intomasterfrom
new_i2c_if3

Conversation

@dylad
Copy link
Copy Markdown
Member

@dylad dylad commented Jul 12, 2018

Contribution description

This PR introduces and adapts to all cpu/board/device drivers, the new I2C interface of RIOT from the feature branch. The branch used is a cloned and rebased version of new_i2c_if because I didn't want to rebase new_i2c_if yet.
All comments/reviews will be much appreciate as the PR is pretty big.

For the 2nd attempt, the new_i2c_if3 used branch is based on new_i2c_if which has been rebase without --preserve-merges option. This option seems to cause some trouble (see discussion #9539)

Issues/PRs references

Tracking issue of the I2C refactoring #6577
Discussion #9539

@dylad dylad added Impact: major The PR changes a significant part of the code base. It should be reviewed carefully Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR TF: I2C Marks issues and PRs related to the work of the I²C rework task force labels Jul 12, 2018
@dylad dylad added this to the Release 2018.07 milestone Jul 12, 2018
@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 12, 2018

@cladmi I have a huge problem here
this commit introduces i2C support in the Makefile.features for nucleo-f070 in the new_i2c_if branch.
But when I rebase the branch new_i2c_if3 to master I got this
the added line to Makefile.features is now to nucleo-f030 not nucleo-f070.
I guess rebase didn't do its job correctly but nucleo's board were renamed.
What can I do ?

EDIT: both links were inverted

@cladmi
Copy link
Copy Markdown
Contributor

cladmi commented Jul 12, 2018

My idea would be to try rebasing but forbid git to perform automatic merge, so that you still must verify each commit.
Maybe you can by putting "edit" for all commits except merges during the rebase and checking each commit… Not sure how "--preserve" likes this though.

@cladmi
Copy link
Copy Markdown
Contributor

cladmi commented Jul 12, 2018

Something that can help finding these, is https://stackoverflow.com/a/40183550/395687

git commit-tree riot/new_i2c_if3^{tree} -p riot/new_i2c_if  -p riot/master -m 'Is that ok?'

And doing git show GIVEN_HASH to see the difference between "merged" diff and "rebased" diff. Some lines have a ++ also. It can help narrowing down these issues.

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 13, 2018

@cladmi The I2C refactoring is now over and ready to be merged. The decision to add it to the incoming release belongs to you :)
Murdock is finally happy with this PR !

@cladmi
Copy link
Copy Markdown
Contributor

cladmi commented Jul 13, 2018

Do you have somewhere the list of tests that was run so they could be re-run in master ?
At least the easy ones and the one that got conflicts.
I think it would be great to add feedback that the rebase is indeed successful.
Also if you could summarize the changes so I could add an info to the release.

@cladmi
Copy link
Copy Markdown
Contributor

cladmi commented Jul 13, 2018

Question, what are all these "fix attr order" and "cleanup AF" ? are these meant to be squashed after ?

I may do a commit by commit diff review on monday.

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 13, 2018

@cladmi mentionned issues are CPP fixes because Murdock was complaining.
Regarding the tests, well all tests were run on hardware with sensors with the related PR. So It's not something easy to re-test.

@kaspar030
Copy link
Copy Markdown
Contributor

Is there somewhere a summary of the actual API changes?

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 14, 2018

@kaspar030 You can have a look at #6577
Or you can search with github all PRs labelled I2C REWORK, then you will have the complete list of all merged PRs into the feature branch.

@kaspar030
Copy link
Copy Markdown
Contributor

You can have a look at #6577
Or you can search with github all PRs labelled I2C REWORK, then you will have the complete list of all merged PRs into the feature branch.

@dylad I'm looking for an API change description. There was a PR / issue somewhere where the discussion took place, but I think it is not #6577.

Copy link
Copy Markdown
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

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

(blocking so noone accidentally hits the green button).

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 14, 2018

@kaspar030 I think you're talking about #6576

I can open a wiki page for summarize all the changes adopted.

@kaspar030
Copy link
Copy Markdown
Contributor

I can open a wiki page for summarize all the changes adopted.

That would be awesome!

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 14, 2018

@kaspar030 I'll inform you when this wiki page will be written. I'll start this weekend if I find some time.

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 14, 2018

@kaspar030 please see here this is the first round of the wiki page. I am not a good writer usually so don't hesitate to correct me or ask for more information.

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Jul 14, 2018

not blocking this PR, but I just want to say that I'm against merging this PR in the current state, because of the suboptimal changes applied to the STM32F1 boards.

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Jul 14, 2018

@dylad, for the wiki page, this PR also contains other changes, not directly related to the new API. These are the ones that come to my mind right now:

  • all STMs CPUs provide I2C and the driver is unified (well, there's 2 versions of it)
  • STM32F3 driver is fixed (it's broken in master)
  • all STMs based boards use the new config style (array of structs), instead of defines
  • previous point is also valid for sam0
  • an I2C config was added to some nucleo/st disco boards provide (b-l475e-iot01a, nucleo-f722ze, nucleo-f070rb, and maybe others I forgot)
  • nrf52xxdk I2C pin change to match Arduino pinout
  • API change in some device drivers: lsm303dlhc, etc (I don't remember the complete list and it's difficult for me to get it on my phone)

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 17, 2018

I think #9574 should be handle before this one. Then I could rebase this branch on master.

@smlng smlng dismissed aabadie’s stale review August 2, 2018 09:30

all comments address, dismiss as suggested

Copy link
Copy Markdown
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

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

ACK

@smlng
Copy link
Copy Markdown
Member

smlng commented Aug 2, 2018

@kaspar030 care to approve or dismiss your review as the release branch is in place for some time now. We have lot's of stuff waiting for this to be master.

@kaspar030
Copy link
Copy Markdown
Contributor

Alright, let's go.

Copy link
Copy Markdown
Contributor

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

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

All good ACK

@smlng
Copy link
Copy Markdown
Member

smlng commented Aug 2, 2018

ACK and GO then!

@smlng smlng merged commit 26c689f into master Aug 2, 2018
@kYc0o
Copy link
Copy Markdown
Contributor

kYc0o commented Aug 2, 2018

Woooow! Congratulations to all the people involved! Special mention to @aabadie @dylad and @MrKevinWeiss. Thanks a lot guys!

@kaspar030
Copy link
Copy Markdown
Contributor

Yes. Congrats to getting the biggest (I think) API-rework in RIOT ever merged!

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Aug 2, 2018

Wow, it's finally over ! I'm so relief !
I'll announce the new on the mailing list today.

@vincent-d
Copy link
Copy Markdown
Member

Congrats and thanks to everyone!

cladmi added a commit to cladmi/RIOT that referenced this pull request Aug 11, 2018
cladmi added a commit to cladmi/RIOT that referenced this pull request Aug 13, 2018
cladmi added a commit to cladmi/RIOT that referenced this pull request Aug 13, 2018
TorbenPetersen added a commit to ibr-cm/RIOT that referenced this pull request Aug 21, 2018
TorbenPetersen added a commit to ibr-cm/RIOT that referenced this pull request Aug 21, 2018
TorbenPetersen added a commit to ibr-cm/RIOT that referenced this pull request Nov 8, 2018
@miri64 miri64 deleted the new_i2c_if3 branch January 30, 2019 14:43
TorbenPetersen added a commit to ibr-cm/RIOT that referenced this pull request Mar 7, 2019
TorbenPetersen added a commit to ibr-cm/RIOT that referenced this pull request Mar 11, 2019
TorbenPetersen added a commit to ibr-cm/RIOT that referenced this pull request Mar 11, 2019
TorbenPetersen added a commit to ibr-cm/RIOT that referenced this pull request Mar 11, 2019
TorbenPetersen added a commit to ibr-cm/RIOT that referenced this pull request Oct 8, 2019
TorbenPetersen added a commit to ibr-cm/RIOT that referenced this pull request Oct 8, 2019
TorbenPetersen added a commit to ibr-cm/RIOT that referenced this pull request Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: major The PR changes a significant part of the code base. It should be reviewed carefully Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. TF: I2C Marks issues and PRs related to the work of the I²C rework task force

Projects

None yet

Development

Successfully merging this pull request may close these issues.