Skip to content

I2C: introduce and adapt new I2C interface#9539

Closed
dylad wants to merge 206 commits intomasterfrom
new_i2c_if2
Closed

I2C: introduce and adapt new I2C interface#9539
dylad wants to merge 206 commits intomasterfrom
new_i2c_if2

Conversation

@dylad
Copy link
Copy Markdown
Member

@dylad dylad commented Jul 10, 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.

Issues/PRs references

Tracking issue of the I2C refactoring #6577

@dylad dylad added Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/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. 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 10, 2018
@dylad dylad added this to the Release 2018.07 milestone Jul 10, 2018
@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 10, 2018

I don't know why static-test failed here while I can merge this branch on my local setup...

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

Might be a problem with the git version, on my macOS with git 2.18 rebase is working fine - but Murdock and Travis use git version 2.17 (or older). @dylad IIRC you had a problem with git before updating too, right?

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

mhm strange on Fedora 27 with git version 2.14.4 it works, and on Raspbian with git version 2.11.0 too.

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

@kaspar030 any idea how to proceed or get over this git rebase problem?

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 11, 2018

Yes I confirm I cannot rebase with git 2.17.1 (default on ubuntu 18.04) I had to switch to version 2.18

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

I don't understand why Travis fails, I just started ubuntu:trusty in docker installed all packages according to our .travis.yml and then make static-test, which succeeded without errors (though some warnings for commit messages longer than 50 chars).

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 11, 2018

What is the git version used in Docker ?

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

@dylad 1.9.1 as in Travis,

BUT the problem is that Travis uses:

git clone --depth=50 https://github.com/RIOT-OS/RIOT.git RIOT-OS/RIOT
git fetch origin +refs/pull/9539/merge
git checkout -qf FETCH_HEAD

using the commands a subsequent git rebase master fails.

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

while rebase works when doing

git clone https://github.com/RIOT-OS/RIOT
cd RIOT
git checkout new_i2c_if
git rebase master

but it does not with this FETCH_HEAD stuff

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 11, 2018

@smlng Then we must change the behaviour of Travis ?

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

I don't know how and if it makes sense

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

interesting: using the command from travis rebase also fails on macOS with git version 2.18

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

its a bit weird, that there are diffs between the new_i2c_if branch and the +refs/pull/9539/merge Travis is using, despite the fact that this PR is based on the named branch.

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 11, 2018

Maybe I did something wrong when submitting this PR on my side ?

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

I don't think so, because GitHub does not report any conflicts for this PR, its mergeable theoretically - but its blocked due to missing review and missing murdock okay 😩

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 11, 2018

@kaspar030 @miri64 We really need your holy words here :(

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

@dylad it looks like you didn't rebase the branch against the latest master, can you rebase the new_i2c_if branch again and push the update. Its best you make a clean checkout eg. in /tmp for this. Maybe this helps, because ideally if the branch is up to date with latest master the rebase should do nothing (ie. git saying "HEAD is up to date.").

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 11, 2018

@smlng I'll try but when I rebased the branch yesterday, I'm sure I was on the lastest (at this time) master already.

dylad and others added 6 commits July 11, 2018 14:18
dylad and others added 9 commits July 11, 2018 14:19
	Changed shell to reflect the api very closely.
	This allows full access to each function for unit testing.
	Add automated script to test devices against a known testers.
	This will make it easier to run tests instead of manual testing.
	This is something that works for now but will be better integrated later.
drivers/hih6130: adapt to new i2c API
…ster

tests/periph_i2c: Add automated tests
cpu: efm32: adapt to new I2C interface
@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 11, 2018

Looks like this is worse...

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 11, 2018

not really, but it didn't help either ...

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 11, 2018

@smlng Could you detailled the steps you used to reproduce the issue on Travis on your side please ?
I'll retest over and over on my side with different git version.

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 11, 2018

I retested locally with :

git clone --depth=50 https://github.com/RIOT-OS/RIOT.git RIOT-OS/RIOT
git fetch origin +refs/pull/9539/merge
git checkout -qf FETCH_HEAD

Indeed, it fails with
git rebase master
but this works with
git rebase master --preserve-merges

using git 1.7.1
using git 2.17.1

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 12, 2018

@dylad (not so) funny side note, when I do

git fetch origin +refs/pull/9539/merge
git checkout -qf FETCH_HEAD
git rebase master

it fails but when I do

git fetch origin +refs/pull/9539/merge
git checkout -qf FETCH_HEAD
git rebase -i master
          ^^^^

and do nothing on the interactive merge just quit the editor (vim) with :q directly ... it works?! 😦

It seems there is a difference in the default merge strategy or something like that, so we might be able to fix this on Murdock, at least.

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 12, 2018

@smlng I'm completely lost with this PR... Why can we merge all the PRs we want except this one ?!

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 12, 2018

there is a merge conflict during the rebase - at least how Travis and Murdock do the rebase. I don't think its git version related.

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 12, 2018

@smlng So you think we should change the behaviour of Murdock/Travis just because of this PR ?

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 13, 2018

closed in favour of (working) #9548

@smlng smlng closed this Jul 13, 2018
@miri64 miri64 deleted the new_i2c_if2 branch July 13, 2018 14:14
@miri64 miri64 restored the new_i2c_if2 branch July 13, 2018 14:14
@miri64 miri64 deleted the new_i2c_if2 branch July 13, 2018 14:14
@miri64 miri64 restored the new_i2c_if2 branch July 13, 2018 14:14
@miri64
Copy link
Copy Markdown
Member

miri64 commented Jul 13, 2018

Sorry, old habbit ^^"

@dylad
Copy link
Copy Markdown
Member Author

dylad commented Jul 13, 2018

@miri64 You can delete this branch if you want,
I plan to cleanup all the mess I introduce after the I2C rework.

@miri64 miri64 deleted the new_i2c_if2 branch July 13, 2018 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/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.

9 participants