Repository navigation
Migrate drivers away from legacy I2C helpers - #936
Open
davecheney wants to merge 2 commits into
Open
davecheney wants to merge 2 commits into
davecheney wants to merge 2 commits into
Conversation
Keep the generated migration separate from the annotations so its effect can be reviewed on its own.
Contributor
|
So this is a net improvement, who likes having |
Contributor
|
Ideally some of these drivers follow the regmap pattern and could easily be rewritten with the idiom |
Contributor
Author
|
Yes, I should add that this PR was mostly to show it off in the monthly call. I just looked for the lowest hanging fruit in the drivers repo to make the point. Probably doing source rewriting en mass would start by planning a better rewrite target than I did by shotgunning those two i2c functions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The legacy I2C register helpers are no longer needed. Deprecate them and let
tinygo fixmigrate callers to direct bus transactions.This is an example of
tinygo fix.90a36d2adds the deprecation warnings and//go:fix inlineannotations.942b9ecis the result of runningtinygo fix -inline -inline.allow_binding_decl=true -target waveshare-rp2040-pizero -tests=trueon 33 caller packages.This is a partial migration. The inline analyzer left calls it could not safely inline, and existing package errors prevented a full
./...run.