Skip to content
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

doc: _scripts: gen_devicetree_rest: add link to driver sources #79259

Merged

Conversation

kartben
Copy link
Collaborator

@kartben kartben commented Oct 1, 2024

When generating the documentation pages for the devicetree bindings, add a link to the .c file implementing the corresponding driver, or folder likely to contain the driver implementation, using heuristics to determine the most likely location of the driver sources. There's probably a few edge cases of drivers that aren't properly "guessed", but for the wide majority of bindings, this significantly improves the user experience when it comes to being able to quickly find the source code of the driver matching a given compatible.

As CI is running in "DT turbo mode" and hence not generating the docs for the DT bindings, you may check the result of this PR over at: https://builds.zephyrproject.io/zephyr/pr/79259-alt/html/build/dts/api/bindings.html

image

When generating the documentation pages for the devicetree bindings, add
a link to the .c file implementing the corresponding driver, or folder
likely to contain the driver implementation, using heuristics to
determine the most likely location of the driver sources.

Signed-off-by: Benjamin Cabé <[email protected]>
@kartben
Copy link
Collaborator Author

kartben commented Oct 1, 2024

Addressed @pdgendt's comment and switched to using a slightly less intrusive "note admonition". See screenshot in the initial comment.

Copy link
Member

@fabiobaltieri fabiobaltieri left a comment

Choose a reason for hiding this comment

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

Really cool. Use the source Luke.

@kartben
Copy link
Collaborator Author

kartben commented Oct 3, 2024

@erwango fyi as I know this is a topic that's typically of interest to you :)

@fabiobaltieri fabiobaltieri merged commit d224fa1 into zephyrproject-rtos:main Oct 3, 2024
16 checks passed
@kartben kartben deleted the bindings_page_driver_link branch October 3, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants