Transfer device numbering control from filesystem to driver#5
Merged
JohnAmadis merged 3 commits intomainfrom Dec 19, 2025
Merged
Transfer device numbering control from filesystem to driver#5JohnAmadis merged 3 commits intomainfrom
JohnAmadis merged 3 commits intomainfrom
Conversation
- Change dev_num parameter in dmdrvi_create from input to output - Add flags field to dmdrvi_dev_num_t structure - Add DMDRVI_NUM_* flags for numbering schemes (NONE, MAJOR, MINOR) - Update all documentation with new paradigm and device naming conventions - Document examples: /dev/dmclk, /dev/dmuart0, /dev/dmspi0/0 Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
- Clarify that dev_num must not be NULL in dmdrvi_create() - Use bitwise flag checking (& operator) for more robust flag detection - Clarify that DMDRVI_NUM_MINOR must be combined with MAJOR - Reorder flag checks to test MINOR before MAJOR (since MINOR implies MAJOR) - Add explanatory comments to flag checking examples Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update driver control for major and minor numbering
Transfer device numbering control from filesystem to driver
Dec 19, 2025
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.
Drivers now manage their own device number namespace instead of receiving numbers from the filesystem layer. Each driver controls its numbering scheme and device file naming convention.
API Changes
dmdrvi_dev_num_tstructure:flagsfield indicating numbering schemedmdrvi_create()Flag constants:
Function signature:
Device Naming
Driver determines device file structure via flags:
DMDRVI_NUM_NONE): Single file with driver name →/dev/dmclkDMDRVI_NUM_MAJOR): Files with major suffix →/dev/dmuart0,/dev/dmuart1DMDRVI_NUM_MAJOR | DMDRVI_NUM_MINOR): Directory/file hierarchy →/dev/dmspi0/0,/dev/dmspi0/1Usage Pattern
Each driver maintains independent namespace - major/minor numbers don't conflict across different driver types.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.