Skip to content

Conversation

@mbolivar-nordic
Copy link
Contributor

Along with #25633 and #25470 (already merged), this PR:

Fixes: #25469

By:

I wanted to make sure the migration guide doesn't regress and the bindings restriction is indeed lifted in perpetuity, so I added test cases as well. I did have to touch gen_legacy_defines.py to make those tests cases not throw warnings about deprecated macros.

With this PR, I also give my sign-off to the DT release notes for #22637.

At some point, "child-binding:" apparently only worked up to 2 levels
deep. That's not the case anymore, but add a regression test to make
sure that doesn't break. 3 levels deep ought to be enough for anyone.

Signed-off-by: Martí Bolívar <[email protected]>
Remove some deprecated or obsolete functionality:

- the 'title:' key is now deprecated
- more than 2 levels of child-binding are now supported

Signed-off-by: Martí Bolívar <[email protected]>
This is preparation for an additional test suite specifically for the
legacy API which will be added next.

Signed-off-by: Martí Bolívar <[email protected]>
@mbolivar-nordic mbolivar-nordic added bug The issue is a bug, or the PR is fixing a bug area: Devicetree Tooling PR modifies or adds a Device Tree tooling labels May 28, 2020
@mbolivar-nordic mbolivar-nordic added this to the v2.3.0 milestone May 28, 2020
@mbolivar-nordic mbolivar-nordic requested a review from nashif as a code owner May 28, 2020 05:01
@mbolivar-nordic
Copy link
Contributor Author

@hakonfam you originally proposed the migration guide, so any feedback on this effort would be welcome. Thanks!

@zephyrbot zephyrbot added area: Devicetree area: Samples Samples area: Tests Issues related to a particular existing or missing test area: Documentation labels May 28, 2020
@zephyrbot
Copy link

zephyrbot commented May 28, 2020

All checks are passing now.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

@mbolivar-nordic mbolivar-nordic force-pushed the dt-docs-for-2.3-part-3 branch from 79a0c0c to 50b753d Compare May 28, 2020 13:46
Copy link
Contributor

@galak galak left a comment

Choose a reason for hiding this comment

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

Looks good, beyond addition of samples/hello_world/app.overlay

@mbolivar-nordic mbolivar-nordic force-pushed the dt-docs-for-2.3-part-3 branch 2 times, most recently from 5efe57c to 4bc1db8 Compare May 28, 2020 16:58
@mbolivar-nordic mbolivar-nordic requested a review from galak May 28, 2020 17:01
@pabigot pabigot self-requested a review May 28, 2020 17:02
Copy link
Contributor

@galak galak left a comment

Choose a reason for hiding this comment

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

Not sure if you can add a license/copyright header to migration-example.inc to make scancode happy.

@mbolivar-nordic
Copy link
Contributor Author

mbolivar-nordic commented May 28, 2020

Not sure if you can add a license/copyright header to migration-example.inc to make scancode happy.

I tried that with the C file but I couldn't get the presentation to come out right using :start-after:; there was an extra newline at the start of the file. I'm just going to inline the content even though that's not as nice.

Add test cases that verify various bits and pieces of the legacy
devicetree macros match the new APIs.

Writing these test cases without giving rise to deprecated macro
warnings which might break people's CI if they build with -Werror
requires turning off the __WARN() generation in
devicetree_legacy_unfixed.h. The entire file is deprecated at this
point and must be explicitly enabled with an opt-in Kconfig option, so
there isn't any harm in doing this.

Nevertheless, take a minimally invasive approach to avoiding __WARN()
generation in gen_legacy_defines.py, to avoid the possibility of
breakage. This code is basically frozen anyway, so hacks like this
won't cause maintainability problems since it isn't being actively
maintained.

Use the new tests as fodder for a migration guide from the old API in
the documentation.

Signed-off-by: Martí Bolívar <[email protected]>
I believe the devicetree documentation for the release is in good
enough shape now. Add a few more links to the release notes to provide
users with more hints for adapting to the new API.

Signed-off-by: Martí Bolívar <[email protected]>
@mbolivar-nordic mbolivar-nordic force-pushed the dt-docs-for-2.3-part-3 branch from 4bc1db8 to 45bb529 Compare May 28, 2020 17:23
@carlescufi carlescufi merged commit af40c99 into zephyrproject-rtos:master May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Devicetree Tooling PR modifies or adds a Device Tree tooling area: Devicetree area: Documentation area: Samples Samples area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix devicetree documentation for new API

5 participants