Skip to content

profiles: Add board_name_pattern key to chwd profiles#263

Open
1Naim wants to merge 4 commits into
masterfrom
feat/board_name_pattern
Open

profiles: Add board_name_pattern key to chwd profiles#263
1Naim wants to merge 4 commits into
masterfrom
feat/board_name_pattern

Conversation

@1Naim

@1Naim 1Naim commented Jul 9, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 Profile parsing/serialization to include optional board_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.

Comment thread src/profile.rs
Comment thread src/data.rs Outdated
Comment thread src/data.rs Outdated
[handheld.intel-msi-claw]
desc = 'MSI Claw Intel'
hwd_product_name_pattern = '^Claw (?:[78] AI\+ A2VM|A1M)$'
[handheld.msi-claw]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

1Naim added 4 commits July 9, 2026 14:11
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>
@1Naim 1Naim force-pushed the feat/board_name_pattern branch from 738c1fa to 21e00e6 Compare July 9, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants