profiles: Add board_name_pattern key to chwd profiles#263
Open
1Naim wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for matching CHWD profiles by DMI board name, and updates handheld profiles to use the new matching key for devices where product_name matching is insufficient.
Changes:
- Extend
Profileparsing/serialization to include optionalboard_name_pattern. - Add board-name filtering to profile/device matching logic.
- Update handheld and test profiles to use
board_name_pattern(and adjust related patterns/names).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/profiles/graphic_drivers-profiles-test.toml | Adds board_name_pattern to the test TOML profile fixture. |
| src/profile.rs | Extends Profile model and TOML parse/emit to include board_name_pattern, and updates parsing tests accordingly. |
| src/data.rs | Applies optional board_name_pattern filtering when selecting devices for a profile. |
| profiles/pci/handhelds/profiles.toml | Updates handheld profiles to use board_name_pattern for ROG Ally / MSI Claw and refines product-name patterns. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [handheld.intel-msi-claw] | ||
| desc = 'MSI Claw Intel' | ||
| hwd_product_name_pattern = '^Claw (?:[78] AI\+ A2VM|A1M)$' | ||
| [handheld.msi-claw] |
Member
Author
There was a problem hiding this comment.
profile was renamed because this profile now also serves AMD claws. let me know if old name wants to be kept for backward compat though.
This adds a new key to profiles: board_name_pattern which matches against DMI board_name like how hwd_product_name_pattern matches against product_name. Signed-off-by: Eric Naim <dnaim@cachyos.org>
Using board_name_pattern intead of hwd_product_name_pattern here enables us to exactly match against the board names instead of product_name(s) where there may be collisions with other devices. Signed-off-by: Eric Naim <dnaim@cachyos.org>
Use board_names for MSI Claw devices like InputPlumber[1] and steamos-manager. board_names are also shorter compared to the product_name(s). [1] ShadowBlip/InputPlumber#620 Signed-off-by: Eric Naim <dnaim@cachyos.org>
Harden against collisions by matching exactly to the product names. Signed-off-by: Eric Naim <dnaim@cachyos.org>
738c1fa to
21e00e6
Compare
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.
No description provided.