-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[DNM][WIP][do not review yet]Service and Device initialization: automatic priorities #79340
Closed
Conversation
This file contains 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
Switching to DEVICE_INSTANCE and DEVICE_INSTANCE_FROM_DT_INST, thus merging former DEVICE_DEFINE and DEVICE_DT_DEFINE into one, so removing the name parameter from the earier and finally removing the prio parameter on all. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to DEVICE_INSTANCE and DEVICE_INSTANCE_FROM_DT_INST, thus merging former DEVICE_DEFINE and DEVICE_DT_DEFINE into one, so removing the name parameter from the earier and finally removing the prio parameter on all. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to DEVICE_INSTANCE and DEVICE_INSTANCE_FROM_DT_INST, thus merging former DEVICE_DEFINE and DEVICE_DT_DEFINE into one, so removing the name parameter from the earier and finally removing the prio parameter on all. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to DEVICE_INSTANCE and DEVICE_INSTANCE_FROM_DT_INST, thus merging former DEVICE_DEFINE and DEVICE_DT_DEFINE into one, so removing the name parameter from the earier and finally removing the prio parameter on all. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to DEVICE_INSTANCE and DEVICE_INSTANCE_FROM_DT_INST, thus merging former DEVICE_DEFINE and DEVICE_DT_DEFINE into one, so removing the name parameter from the earier and finally removing the prio parameter on all. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
In order to get rid of the manually inserted initialization priority, device object generation need new macros. Again removing the prio parameter. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to SENSOR_DEVICE_INSTANCE and SENSOR_DEVICE_INSTANCE_FROM_DT_INST, thus removing the prio parameter on all. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Again removing the prio parameter. Managing the ident as a DT node-id or dev_id helps to reduce the number from 12 to 7 macros. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to NET_DEVICE_INSTANCE, NET_DEVICE_INSTANCE_FROM_DT_INST, NET_DEVICE_INSTANCE_MULTI, NET_DEVICE_INSTANCE_MULT_FROM_DT_INST, NET_DEVICE_OFFLOAD_INSTANCE and NET_DEVICE_OFFLOAD_INSTANCE_FROM_DT_INST. Thus removing prio and name parameters on all. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Again removing the prio and name parameters. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to ETH_NET_DEVICE_INSTANCE, ETH_NET_DEVICE_INSTANCE_FROM_DT_INST and ETH_NET_DEVICE_INSTANCE_MULTI. Thus removing prio and name parameters on all. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to NET_DEVICE_INSTANCE, NET_DEVICE_INSTANCE_FROM_DT_INST, NET_DEVICE_INSTANCE_MULTI, NET_DEVICE_INSTANCE_MULT_FROM_DT_INST, NET_DEVICE_OFFLOAD_INSTANCE and NET_DEVICE_OFFLOAD_INSTANCE_FROM_DT_INST. Thus removing prio and name parameters on all. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Again removing the prio parameter. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to CAN_DEVICE_INSTANCE and CAN_DEVICE_INSTANCE_FROM_DT_INST relevantly. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Again removing the prio parameter. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to SMBUS_DEVICE_INSTANCE and SMBUS_DEVICE_INSTANCE_FROM_DT_INST relevantly. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Lone files that define their own wrapper macro on top of formely DEVICE_DT_DEFINE macros. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Again removing the prio parameter. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Switching to I2C_DEVICE_INSTANCE and I2C_DEVICE_INSTANCE_FROM_DT_INST relevantly. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Again removing the prio parameter. However, original macro does not seem to be used anywhere... Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Again removing the prio parameter. And switching the unique macro call in drivers. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
A few test and samples require explicit dependency resolution as the devices they introduce do not have any DTS counter-part. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
A few device drivers need to get the dependency properly set up. This is only true for non-DT based devices. One of the changes being the device "unike token" which was made of capital letter for some reason on crypto side etc... Basically, legcay things that should disappear and be fully managed at DTS level. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
It's clearly a bug: an input device is not meant to listen to itself. This creates a dependency loop, and it is actually surprising this did not get detected by DTS (which does call add_edge on graph on the same node). Binding description of the node says 'input' property can be left empty so removing the line entirely. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
linker-defs.h does a weird trick around DT_NODE_HAS_STATUS. The issue is that intrications of includes might anyway end up including linker-defs.h and devicetree.h (as it requires other macros in that last header). Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
Now that init ordering got back to a unique number (automatically computed or provided manually with legacy macros) the priorities need to be sorted relevantly so the erroneous ordering still matches the expectations. When legacy macros will be removed after a deprecation period, such test and most probably check_init_priorities.py tool as well won't make sense anymore. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@proton.me>
837ef38
to
82530d6
Compare
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
DO NOT REVIEW YET (I just need to see first what CI will find out, my potato PC cannot run the whole test suites)
This is a fix for #76937 after discussing on the RFC #73836
I applied most comments made during these discussion.
Added to this I (tried to) switch most device macro calls to new ones. Which make this PR a huge one in files touched and modified lines. There are few corner cases which prevent changes: PTP and ethernet's DSA. These needs to switch to DTS.
Last but not least: brace for impact /o\